CPB employees, please start at james.cpb.nl and contact the author if you run into bugs or if you want to make use of features that are not implemented yet. For questions about layout or help adapting your figures to the CPB-style, please contact the Communication Department. Please beware that browsers other than Chrome may not display this manual correctly.
This manual explains how to create customizable CPB-style figures with James from Excel and R. James’ goal is to tackle most of the CEP/MEV figures, which amounts mainly to customizable line and bar figures, scatter plots and fan charts - brightened up with some text labels. New:
style = wide)style = english)style = no-title, no-legend)turn = y)logo = y)x_at_r = 0:4 / 2 is equivalent to
x_at = 0, 0.5, 1, 1.5, 2footnote_r = "hi" is equivalent to
footnote = hi (please beware of the quotes)cache)parallel= yes
(e.g. in tab globals) to speed-up the process.
Beware, this functionality is under development and may crash
unexpectedly.create = no to temporarily skip
certain figuresOn top of the information above, you need to know the following. The general workflow to create figures with James:
M:/p_james/releasexlsx files it sees
metatab holds the
name of the figure’s data tabgenerated/ with your figureslock= no. Please do
so with great care.tabPro tip: if you want to process only specific xlsx-files, you can provide those files as argument of ‘james.bat’ (e.g.,
james.bat path/to/file1.xlsx other/path/to/file2.xlsx).
So, how to start now? This manual recommends to first get some experience by running through the subsection A kick-start example below. Next, you can skip through this manual and find a figure with a style you like. Below that figure you’ll read how to reproduce that figure. You can use that as a starting point and adapt it to your personal needs. Tip: use \(<\)Control\(>\)+F to quickly find terms in this manual.
The following figure is a so-called ‘Hello World’ example. Directly below the figure you’ll find the instructions to reproduce it (in green).
|
|
Relevant parameters:
|
||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||
The following two subsections explore and slightly adapt the Excel file (please find a download link for the Excel file below the figure).
Once you have a figure, it’s easy to change its layout. The previous
figure transforms into the following figure after changing only three
parameters. Parameter type = bar= indicates that we want
bars instead of lines. The = in bar= indicates
we want to have the bars stacked. Alternatively, you could choose
bar-- to have them shown next to each other instead of
stacked. Parameter turn = y turns the figure from portrait
to landscape by putting the x-axis vertical and the y-axis horizontal.
Parameters style = no-title obviously removes its title.
Similarly, you can remove the legend with
style = no-legend.
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||
The first column of the data tab should contain the
x-values. If the x-values are numeric, James
will try to find elegant equidistant values to display. If the
x-values contain a non-numeric character, James will
display them ‘as is’. The data type of the first column may also be of
type ‘date’ (please beware: this functionality has not been exhaustively
tested and may thus lead to unanticipated results). The second and
following columns contain the y-values of your variables
(one variable per column), corresponding to the x-values in
the first column. In cases where you want to ‘group’
x-values or y-variables, the exact data
structure may slightly deviate from the above description; please see elsewhere in this manual for details.
Once you succeed to reproduce the above figure(s), you’re ready to learn more!
Next to plotting Excel data with James, you can also use James to
plot your data in R. The caption below each figure in this manual
explains how to reproduce that figure with James in R. The name of
James’ R-package is nicerplot (pronounce: nice R
plot or nicer plot). (You can even install nicerplot at
home from this code
repository.)
You can load this package as follows.
library(nicerplot)
Package ‘nicerplot’ exports functions (i) ‘nplot’ as equivalent of the R-function ‘plot’, (ii) ‘import’ to import an xlsx-file as object in R, and (iii) ‘nhelp’, which you can use to get help for a given parameter. The ‘nplot’-function takes the following different types as argument:
nplot("url-to-cbs", ...); please see this section for details;nplot("path/to/file.xlsx", ...);nplot(m, ...), where m is matrix;nplot(d, ...), where d is a
dataframe;nplot(z, ...), where z is a time series
object and is.ts(z) or is.mts(z);nplot(lst, ...), where lst is a list;... are meta-data parameters, which override
parameters set in the xlsx-file and list elements.Don’t forget to use quotes around the parameter values if you work
from R. For example, if you want to create a pdf instead of a png:
nplot("path/to/file.xlsx", pdf = 'y', png = 'n'). Remark:
because parameters pdf and png are of type
Boolean, you can also use pdf = TRUE and
png = FALSE in R.
The rest of this manual assumes that you work with Excel and specify the meta data in a so-called ‘meta-tab’ (a tab named ‘meta’).
The parameter called type
specifies how the time series should appear in your figure. (Please do
not confuse the parameter type with the type of a parameter’s values.) If you leave
parameter type empty, it will default to
type = line. If you specify only one value (e.g.
type = bar--), James will use that value for each of the
time series in your data. If want to mix different types, then you
should specify the type for each of your time series. In which case the
type’s n’th element corresponds to the n’th time series in your data. In
particular, time series that are described with two columns of data
(e.g. fan/bandwidth/area and whiskers), also need two values
for parameter type.
Parameter
typemust have either zero values, one value, or n values. In case of zero values it defaults tolinefor all time series. In case of one value, this type will be used for all time series in your data. Otherwise, n should equal the number of time series columns in your data (i.e. all, exclusive the x-axis).
Section ‘A kick-start example’ shows how to create a line figure with two series. The following figure is a more realistic example.
|
|
Relevant parameters:
|
||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||
Examples of figures with lines: Hello World, Hello World, Werkloosheid, Six different line types, Ontwikkeling EMU-schuld in schokscenario’s, Number of phones US vs. Europe, Industriële productie en detailhandel, Two bandwiths in one plot, Oversterfte in 2020, Bestaande koopwoningen, Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Forecasted from 1958, Geraamd vanaf 1958, Werkverliezers, Bestaande koopwoningen, A discontinuity, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , Groeibijdragen bestedingen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, NA, Economische groei in Nederland, No auto-scaling, The use of y_r_lim.
A discontinuity works as follows. The data for the x-axis, in the first column of your xlsx-file, needs values everywhere. So, you should provide an x-value at the position where you want the discontinuity. You can leave the cell, which corresponds to the position of the discontinuity in the respective series, empty. Please look at the xlsx-file (link below figure) to see how that’s done here. This example also shows how to put multiple variants of the same series in the same plot.
|
You can take a look at the xlsx-file to see how this is done. |
Relevant parameters:
|
||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||
Next to the default ‘solid’ line (i.e. line_lty= 1)
there are five other line types you can choose from. The order of the
values you give to a parameter corresponds to the order of the lines.
So, the first value corresponds to the first line, the second value to
the second line, etc.
|
|
Relevant parameters:
|
||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||||||
You may have data that is partly observed and partly forecasted. In
this case you can use parameter forecast_x to indicate
where the forecast starts.
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||
This manual describes forecasts in more detail in a separate section below.
This paragraph explains how to compose a line that is solid at one
end and dashed at the other end. Herefore, you need to create two
separate time series; one for the solid line, and one for the dashed
line. In addition you may want to do two other things as well. By
default, James gives each next time series in the data sheet the color
that is next in the color palette. So, firstly, you may
want to give both parts of the same time series the same color.
Secondly, you may want to remove the second time series from the legend.
The following figure shows how that is done in practice.
|
|
Relevant parameters:
|
||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||
You can decorate your line with dots, diamonds or other symbols. This figure shows the available symbols. The symbols are superimposed at the data points you provide in your data tab. An example:
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||
The following example adds a ‘brown’-colored diamond to the second time series. The diamond is automatically added to the legend too.
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||
Next to symbols you can add arrows to the curves in your figure. You may want to do so in case of e.g. a Beveridge curve or UV curve, where the arrows indicate the chronology of data points in a two dimensional space with unemployment rate on the x-asis and vacancy rate on the y-axis.
In the most easy case all series of type ‘line’ are considered to be part of one large curve. See for example the figure below in which all series are part of the total curve although each individual series corresponds to a different period in time. Suppose you have \(n\) series of data points with a combined length of \(N\) in the (x,y)-plane. You can use parameter ‘arrow_n’ to define the total number of arrows you want on the ‘combined curve’. Let \(\delta\) = \(N\) / arrow_n be the distance between each of the arrow_n arrows along the curve. The first arrow will be placed at length \(\delta\) / 2. Consequently, the last arrow will be placed at length \(\delta\) / 2 before the end of the curve. So, if you would connect the start point with the end point of the curve, then all consecutive arrows will be placed equidistantly. By default each arrow gets the color of the series it attaches to.
|
|
Relevant parameters:
|
||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||
The following figure shows that instead of specifying the total number of arrows, you can specify the number of arrows per series (in the figure below: parameter ‘arrow_n = 1, 0, 1, 2, 3’). If you specify one single color for parameter ‘arrow_col’, each arrow will get that same color. The figure below colors all arrows black.
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||
Parameter ‘arrow_position_pct’ gives the user full control over the exact positions of the arrows. The percentage corresponds to the distance traveled on ‘printed paper’, i.e., irrespective of the values on the axes. A value of 0% corresponds to the start of the ‘total curve’; 100% corresponds to its end. You can provide a list with percentages to pinpoint the arrows to. In the figure below, paramtere ‘arrow_col’ provides a separate color for each of the arrows.
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||
The parameters you can use to tweak your arrows are:
arrow_angle:
angle between time series and arrow
head line (0…360). The value is of type
‘numeric’. Unit: ‘arc degree’. Example(s): 15, 75. For the
default style the value is 15.
arrow_col:
colour of the arrows that decorate
your line. The colours default to the colour of the time series the
appear on. If you supply one colour, all arrows will get the same
colour. The alternative is to supply one colour for each individual
arrow. The value is a list with elements of the
type ‘string’ separated by ‘,’. Example(s):
endeavour, rose, endeavour. Figure(s) using ‘arrow_col’:
Spanning op arbeidsmarkt blijft
toenemen, Spanning op arbeidsmarkt blijft
toenemen.
arrow_length_cm:
length of arrow head line. The
value is of type ‘numeric’. Unit: ‘cm’.
Example(s): 0.5, 1, 2. For the default style the
value is 0.2.
arrow_n:
number of arrows on time series of type
line. If you provide 1 number, then this number represents the total
number of arrows on all ‘line time series’ together. If there are k >
1 time series of type line, as an alternative to providing only one
number, you can provide k numbers. In that case you set the number of
arrows for each of the line time series individually. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
5; 3, 2, 3, 4. See also parameter(s): arrow_position_pct. Figure(s)
using ‘arrow_n’: Spanning op arbeidsmarkt
blijft toenemen, Spanning op
arbeidsmarkt blijft toenemen.
arrow_position_pct:
consider all time series of
type ‘line’ glued together as one large curve. The percentage
corresponds to the distance traveled on ‘printed paper’, i.e.,
irrespective of the values on the axes. The start of the curve is 0%,
the end is 100%. Distances and percentages You can use this parameter to
specify the locations at which you want to position an arrow. Please
note that 0% is not allowed, use 1% instead. In addition, parameter
‘arrow_position_pct’ and ‘arrow_n’ are mutually exclusive, i.e. you
should define at most one of the two. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Unit: ‘%’.
Example(s): 1, 25, 50, 75, 100. See also parameter(s): arrow_n. Figure(s) using
‘arrow_position_pct’: Spanning op arbeidsmarkt
blijft toenemen.
You can use the following parameters to customize lines. Please beware that the order of the values you give to a parameter corresponds to the order of the lines; i.e., not necessarily to the order of the time series if some of them are not lines. So, the first value corresponds to the first line, the second value to the second line, etc.
line_lty:
line type (1: continuous; 2, 3, … have
dashes). For dashes the advice is to use 3. Please beware that the
forecasted part of a line is automatically dashed, unless you specify
this parameter. The value is a list with
elements of the type ‘numeric’ separated by
‘,’. Example(s): 1, 1, 3, 1 if the third line is dashed.
For the default style the value is 1. See also
parameter(s): line_obs_fc_lty.
Figure(s) using ‘line_lty’: Six different line
types, Partly dashed line,
Two bandwiths in one plot,
Oversterfte in 2020,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
trend-vs-niveau.
line_lty_correct_pdf_and_svg:
auto-fix dashed
lines in pdf and svg. The advice in *.gif/jpg/png is to use ‘line_lty =
3’ for dashed lines. In pdf/svg the intended dashes show up as small
dots instead. This can be solved by replacing ‘line_lty = 3’ with
‘line_lty = 2’ for pdf/svg. The value is of type ‘bool’. For the default style the
value is y.
line_symbol:
add a symbol to your line. This may
be e.g. a dot (1, 19, 20) or a diamond (18). The symbol will be added at
the data points that define your line. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
0, 1, 2, …, 23. For the default style the value is
0. See also parameter(s): dot_shape. Figure(s) using
‘line_symbol’: Ontwikkeling EMU-schuld in
schokscenario’s, Number of phones US
vs. Europe.
line_symbol_col:
color of the symbols that
decorate your line. The colors default to the line color. The value is a
list with elements of the type ‘string’ separated by ‘,’. Example(s):
endeavour, anakiwa, rose, mauvelous, brown, cold_turkey, siren, biscay, dorado, sun.
Figure(s) using ‘line_symbol_col’: Number
of phones US vs. Europe.
Bars can be next to each other (type = bar--) or stacked
(type = bar=) or a combination of the two.
Parameter type = bar-- puts bars next to each other.
|
|
Relevant parameters:
|
||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||
In this example there is no data given for years 1952 … 1955. Therefore, you see a ‘gap’ between the subsequent sets of bars. The figure, however, could suggest that there were no phones in those years. To circumvent this issue, you can consider to tell James that the values on the x-axis are ‘words’. James does not interpret their value then and just puts them equidistant on the x-axis – as can be seen in the following example.
|
|
Relevant parameters:
|
||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||
List of figures with bars next to each other: Number of phones in the world, Number of phones in the world, Number of phones in the world, Number of phones in the world, NA, Europese steunpakketten, VWO, VWO, VWO, {x,y}lab{bold,italic}, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), VMBO, Verwacht verlies in verschillende scenario’s, Economische groei in Nederland, No auto-scaling, The use of y_r_lim.
Type bar= stacks bars.
|
|
Relevant parameters:
|
||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||
Parameter bar_stack_index
determines the positions of the stacks. By default they are shown at the
right hand side. The figure below sets bar_stack_index = 1
and moves the stacks to the left. It also sets a name for the stack and
adds it to the legend by with
bar_stack_name = "The Americas".
|
|
Relevant parameters:
|
||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||
List of figures with stacked bars: NA, Number of phones in the world, Number of phones in the world, Number of phones (Europe yellow), Forecasted from 1958, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , Tozo, Investeringen in Nederland¹ door de zwaarst- getroffen eurolanden in 2018 en vice versa, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Verlies van banken na afschrijving 20% van de overheidsschuld van GIIPS-landen, Violent crime rates in the USA, Tozo-uitkeringen per maand.
The visualization of many bars in one figure may be a challenge.
Opting for a wide figure (style = wide) obviously helps to
create more space. In addition one can play with bar_gap_fraction,
here set to 0.5 in the figure below so the size of the whitespace
between the bars is balanced with the width of the bars. To ensure that
the line is not submerged by the bars, the line is highlighted.
The author uses x_scale= 1000
because the x-values where given in thousands of euros and the
author wants just euros on the x-axis. Putting x_lab_big_mark_show= y
adds a thousands separator so large numbers are easier to read.
|
| ||||||||||||||||||||
|
Relevant parameters: | ||||||||||||||||||||
| ||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. |
One can group data points. Dependent on the orientation of the plot
(turn = y or turn = n), the groups are shown
in a different manner.
The following example shows how you can ‘manually’ group data points.
Please note the zero that was added to the data (below the figure is a
link to the xlsx-file). The zero creates space between the groups. In
addition, y-axis, which is now the x-axis because turn = y
starts at zero. If you don’t want this number (here: 0) to affect your
axis, you can choose a value in between the range of the other
values.
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||
In the xlsx-file you can add group names in a column preceding your data:
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||
For horizontal grouping, you can use parameter group_spacing if you
want to add some extra space between the groups. This parameter also
works for vertical grouping but may be less needed there.
|
|
Relevant parameters:
|
||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||
By default, James assumes that the columns in your data tabs are time
series. The following figure adds parameters first_col_grouping
and x_lab_as_text to
deal with the case in which you want ‘grouping’ and both the values at
the x-axis and the group names are numeric.
|
|
Relevant parameters:
|
||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||
Another example of horizontal grouping is the following figure. The
x_title is shifted lower
with x_title_v_shift and
used to add a kind of extra footnote refering to the title (using ¹).
The legend is shifted higher with legend_y and put on one line
with legend_n_per_column
to make space for it. In addition x_lab_font_size
scales the font size of labels at the x-axis somewhat smaller.
|
|
Relevant parameters:
|
||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||||||||
first_col_grouping:
this parameter defines
whether or not the first column in the data tab represents normal
x-values (first_col_grouping = n) or whether it contains
group names for the x-values (first_col_grouping = y). If
you don’t set this parameter, James tries to guess the value of this
parameter as follows. If the second column contains at least one
character (i.e. a non-numeric value),
first_col_grouping will be set to y
automatically. Otherwise it is set to n automatically. You
can overrule the automatic settings by setting this parameter by hand.
This may happen if the values on the x-axis are numerical. The value is
of type ‘bool’. Figure(s) using
‘first_col_grouping’: Tozo.
first_row_grouping:
this parameter is for boxes
only. See section box plot. It defines
whether or not the first row in your data tab contains group names of
your time series box plot. Boxes can be grouped, which gives the boxes
in the same group the same ‘header’ (and the same color if you want to).
You should put the group names in the first row, i.e. above the
time series names. In most cases you don’t have to set this parameter
manually as James will automatically set the value of parameter
first_row_grouping = y if any of the time series comprises
a character. If James erroneously puts group names above your boxes, you
can manually overrule this by setting
first_row_grouping = n. The value is of type ‘bool’.
group: names
of groups. If given, number of elements should equal number of time
series. The value is a list with elements of
the type ‘string’ separated by ‘;;’.
Example(s): group-1;; group-2;; group-2. See also
parameter(s): first_row_grouping, box_col_per_group, name.
group_col:
not documented yet. The value is of type ‘string’. For the default style the
value is black.
group_font:
1 = normal, 2 = bold, 3 = italic, 4 =
bold and italic. The value is of type
‘numeric’. Example(s): 1, 2, 3, 4. For the default
style the value is 2.
group_font_size:
not documented yet. The value is
of type ‘numeric’. For the default
style the value is 1.
group_spacing:
extra space between groups. The
value is of type ‘numeric’. Example(s):
0, 0.5, 1, 2. For the default style the value is
0. Figure(s) using ‘group_spacing’:
VWO,
Tozo,
Investeringen in Nederland¹ door de zwaarst-
getroffen eurolanden in 2018 en vice versa.
group_x:
the x-positions of the group names.
James will set them automatically if not specified by user. Please
beware that the group names should be placed at different positions,
dependent on the orientation of your plot (i.e.,
turn = y or turn = n). The value is a list with elements of the type ‘numeric’ separated by ‘,’.
labels_margin_add_for_groups:
minimal distance
between group name and series name. The value is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 0.
x_lab_group_v_shift:
downshift of the
group-labels below the x-axis. The value is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 0.5.
In general, parameter highlight_series
will give color highlight_col (default:
rose) to that series. I.e., also for non-bar type figures.
The following figure, for example, highlights the second time series.
|
|
Relevant parameters:
|
||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||
If you use this parameter to highlight a time series of type ‘bar’
(bar-- or bar=), you can choose to limit the
highlighting to one bar in particular. The following figure shows how
you can do so with parameter highlight_x.
|
|
Relevant parameters:
|
||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||
Please note that if the ‘highlight color’ is part of your palette, which the default highlight color is, it will be removed from the palette so that only the highlighted time series gets the wanted color.
These parameters enable you to highlight a certain time series or a certain bar of a certain time series.
highlight_col:
for highlighting a time series.
The value is of type ‘string’. Example(s):
#ffa500. For the default style the value is
rose. Figure(s) using ‘highlight_col’:
Number of phones (Europe yellow).
highlight_series:
time series you want to
highlight. The value is of type ‘numeric’.
Figure(s) using ‘highlight_series’:
Number of phones (Europe yellow),
Europese steunpakketten,
Decompositie gemiddelde marginale belastingdruk
werknemers 2021 , Verlies van banken na
afschrijving 20% van de overheidsschuld van GIIPS-landen.
highlight_x:
if you want to highlight a time
series of type ‘bar’, with this parameter you can narrow the highlight
to only one given x-position. The x-position specified here, is
interpreted as a number (only if all values on the x-axis are numbers)
or as a string (if at least one of the values on the x-axis is a
string). Obviously, you can highlight more than one value (of one and
the same time series). The value is a list with
elements of the type ‘string’ separated by
‘;;’. Unit: ‘x’. Example(s): bbp. Figure(s) using
‘highlight_x’: Europese steunpakketten.
bar_gap_fraction:
how much space you want between
the bars of two consecutive x-points, where 0 means no gap, 1 means no
bars. The value is of type ‘numeric’. Unit:
‘fraction’. Example(s): 0, 0.1. For the default
style the value is 0.2. Figure(s) using ‘bar_gap_fraction’:
Decompositie gemiddelde marginale belastingdruk
werknemers 2021 .
bar_lab_big_mark_show:
for the values in or above
bars, use y if you want a character between every three
digits left of the decimal separator. The value is of type ‘bool’. For the default style the
value is y.
bar_lab_col:
color of the labels. The value is of
type ‘string’. For the default style
the value is black.
bar_lab_font_style:
1 = normal, 2 = bold, 3 =
italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s):
1, 2, 3, 4. For the default style the value is
1.
bar_lab_n_decimals:
the number of decimals the
bar labels should get. The value is of type
‘numeric’. For the default style the value is 0.
bar_lab_rotation:
rotate the barplot labels. Zero
(0) for horizontal. 90 for vertical. Leave empty for default
(i.e. horizontal for labels on top of the bars, vertical for
labels inside the bars). The value is of type
‘numeric’. Unit: ‘degrees’. Example(s): 0, 90. For the
default style the value is [not set].
bar_lab_show:
you can show the value of the bar
on top of it, or in its middle. The value is of type ‘bool’. For the default style the
value is n. See also parameter(s): bar_lab_n_decimals, bar_lab_top, bar_lab_increase_y_lim_2.
Figure(s) using ‘bar_lab_show’: kansrijk.
bar_lab_top:
y means top,
n means middle. The value is of type ‘bool’. For the default style the
value is y.
bar_stack_index:
the position where the stacked
bars should appear if you also have bars next to each other. Default is
at the right. The value is of type ‘numeric’.
Figure(s) using ‘bar_stack_index’:
Number of phones in the world.
bar_stack_name:
name that explains what the sum
of the stacked bars means. The value is of type
‘string’. Figure(s) using ‘bar_stack_name’:
Number of phones in the world.
This section shows how to add dots to your plot. The following parameters help to fine-tune the dots to your needs. Dots can have different shapes and sizes. Probably, ‘symbol’ would be a more appropriate name for this variable.
dot_shape:
there are over 20 symbols you can
choose from; they are all shown in one of the figures in the manual.
There are two types of alternatives to the shapes. Firstly, you can use
‘.’ (a period) to specify very small dots. Secondly, you can use a
single character (e.g. a letter, digit or sign (e.g. a, 1, or %)). The
value is a list with elements of the type ‘numeric’ separated by ‘,’. For the
default style the value is 19. For the
ppower style the value is .. Figure(s) using
‘dot_shape’: Verlies van banken na afschrijving 20%
van de overheidsschuld van GIIPS-landen.
dot_size:
size of symbol, c.q. dot. The value is
a list with elements of the type ‘numeric’ separated by ‘,’. For the
default style the value is 1. Figure(s) using
‘dot_size’: Older workers more
productive?, Overlapping labels (NL,
PT), Different alignment
for PT, Verwacht verlies in verschillende
scenario’s, Two series of whiskers in
one plot, Verwacht verlies in
verschillende scenario’s.
legend_dot_col_trans:
if a dot is transparent in
the figure, should it be transparent in legend too? The value is of type ‘bool’. For the default style the
value is n.
List of figures with dots: Phones per continent, Verlies van banken na afschrijving 20% van de overheidsschuld van GIIPS-landen, Older workers more productive?, Overlapping labels (NL, PT), Different alignment for PT, Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot, Verwacht verlies in verschillende scenario’s.
A scatter plot is a type of graph that displays the relationship
between two continuous variables by plotting their values as dots.
Although the following figure does not look like a typical scatter plot,
i.e. a cloud with many small dots, it illustrates the idea how one can
construct a scatter plot. Because the figure has only a few dots, you
may want the dots to be big. You can use dot_size to downscale the
dots or use dot_shape= .
to get really small dots for cases with many dots.
|
|
Relevant parameters:
|
||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||
The following figure shows the different symbols you can choose from.
As an alternative to the above 23 shapes, you can also use a dot
(dot_shape = . or equivalently dot_shape = 46)
and letters as symbol shape. Value . is handled specially.
It is a rectangle of side 0.01 inch = 0.0254 cm (scaled by
dot_size). In addition, if dot_size = 1 (the
default), each side is at least one pixel (1/72 inch on the pdf).
The two subsections below describe how to visualize your time series as an area, bandwidth and fan.
Parameter type = area= stacks the time series in your
plot as areas, starting at the x-axis; i.e. the y-axis includes
y = 0 by default. Parameter area_stack_name
enables you to label the stack in the legend. An example of which is
shown in the following figure. Please note that by default the
area_stack_name is placed last in the legend; i.e.
at position 4. To achieve the same vertical order in the legend as in
the figure and keeping the area_stack_name last, parameter
legend_order
= 3, 2, 1, 4.
|
|
Relevant parameters:
|
||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||
Time series of type area= may have negative values, in
which case the area is placed below the x-axis. Please beware, a stacked
area is currently not allowed to have both positive and negative values.
In other words, a ‘stacked area’ can’t cross the x-axis.
List of figures with stacked areas: NL’ers hebben buitenlandse obligaties, Cohorten omvatten veel asielmigranten, Geraamd vanaf 1958.
This subsection describes how you can plot an area without stacking
it on another area. A non-stacked area has a bottom and a top. So,
you’ll need two series of data to describe one area. These series you
can mark with type = area, area, consecutively.
The following figure shows two lines with a confidence interval. The color palette is chosen so it’s clear to which line the interval belongs.
|
|
Relevant parameters:
|
||||||||||||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||||||||||||||||||
One figure can hold more than one bandwidths:
|
|
Relevant parameters:
|
||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||
The Section on ‘execution pipelines’ below explains in detail in which order James executes the different plotting steps that construct your figure. In general, areas are large and therefore plotted before other elements. The data sheet determines the plotting order of different areas in your figure. The idea is that series that are present first (i.e., more to the left in the sheet) are more important and therefore plotted as last. So, in case two areas show overlap, the ‘important’ area is plotted on top of the ‘less important’ area. Please note that if you change the order of the time series in the data sheet, then the order in the legend changes correspondingly.
The following figure shows how you can play with the order of the
time series and the order of the legend. Here, the time series ‘aantal
asielaanvragen en nareizigers’ is shown as ‘background’. Therefore, it
is placed at the right side of the data sheet; you can use the link
below the figure to download the xlsx-file and check the data sheet.
This specific series, however, should appear first in the legend.
Parameter
[legend_order](#parameter_legend_order)) = 3, 1, 2
accomplishes this.
|
|
Relevant parameters:
|
||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||
Please note that the two blue areas have vertical borders at their
left and right side. Adding the x-value of the vertical
boundary twice to the data set enables you to create vertical borders.
For example for the left boundary: adding
(x, y) = (1995, 0) and (x, y) = (1995, 21)
does the job. The y-values of the other time series are just
duplicated for those x-values. Please download the xlsx-file of
the above figure and take a look at the data tab for a practical
example.
area_stack_name:
name that explains what the sum
of the stacked areas means. The value is of type ‘string’. Figure(s) using ‘area_stack_name’:
NL’ers hebben buitenlandse obligaties.
This section explains how to use whiskers in your figure.
|
|
Relevant parameters:
|
||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||
Parameter whisker_series
indicates to which series the whisker(s) belong. This is important for
the following three reasons. First it determines the position of the
whisker in the legend. Second for a bar plot this parameter is crucial
for the x-position of the whiskers. In the following figure,
whisker_series = 2 makes sure that the whisker is shown on
top of the second time series (i.e. the right-hand bar). Third,
in case of a plot that contains bars with whiskers, James will
automatically limit the width of the whiskers to the width of the
corresponding bars (manually adaptable by parameter whisker_edge_length),
which prevents whiskers to overlap with each other.
The following is an example how multiple whiskers can be put in one plot. The author of the figure manually shifted the first series a little to the left and the second a little to the right. You can inspect the xlsx-file.
|
| ||||||||||||||||||||||||||||||
|
Relevant parameters: | ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. |
Whiskers in bar plots:
|
|
Relevant parameters:
|
||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||
Parameter whisker_legend_show_n
determines the number of whiskers the legend shows - which you may want
if different whiskers have different meanings.
|
|
Relevant parameters:
|
||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||
List of figures with whiskers: Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), VMBO, Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot, Verwacht verlies in verschillende scenario’s.
whisker_col:
color of whiskers. You can supply a
different color for each whisker. The value is a list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is black. Figure(s) using
‘whisker_col’: Verwacht verlies in verschillende
scenario’s, Two series of whiskers in
one plot.
whisker_edge_length:
not documented yet. The
value is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 7.0000000000000007E-2.
whisker_legend_col:
color of whiskers in legend.
If no value specified, whiskers will take same color as in figure. The
value is of type ‘string’. Figure(s) using
‘whisker_legend_col’: Two series of
whiskers in one plot.
whisker_legend_show_n:
the number of whiskers you
want to show in your legend. If different whiskers for different series
have different meanings, you may want to show them all. If you don’t
want to see whiskers in your legend, then set whisker_legend_show_n = 0.
Please note that you can change the order of the whiskers in your data
if needed. The value is of type ‘numeric’.
Example(s): 0, 1, 2, …. For the default style the
value is 1. Figure(s) using ‘whisker_legend_show_n’:
Impact no-deal Brexit (horizontal),
Impact no-deal Brexit (tall),
VMBO,
Two series of whiskers in one plot.
whisker_lwd:
not documented yet. The value is of
type ‘numeric’. For the default style
the value is 0.5.
whisker_series:
time series which this series
corresponds to. The default value is set so that your first whisker
definition is superimposed on the first time series (bar–), the second
on the second, etc. If, for example, you have a whisker for only one of
the time series, you can indicate here which time series that is. The
value is a list with elements of the type ‘numeric’ separated by ‘,’. For the
default style the value is
1, 2, 3, 4, 5, 6, 7, 8, 9, 10. Figure(s) using
‘whisker_series’: Verwacht verlies in
verschillende scenario’s.
You can combine different types in one plot. Parameter name_col colors the line
black. Section ‘Colors’ discusses how to use this
paramter.
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||
The figure below is another real world example that combines bars
with dots dot_shape = 18. The ‘dots’ are highlighted with
default color highlight_col = rose. If that color is part
of your palette (which it is here!), it will be automatically removed
from the palette so that only the highlighted time series gets the
desired color.
Please note that in the figure below, the values on the (here
vertical) x-axis are labeled x_title = land. Parameter
x_title_align = left is needed to put that label at the
left side of the top x-axis. The author of the software realizes this
behaviour is not entirely consistent - a future update of the software
may improve/change this behaviour.
|
|
Relevant parameters:
|
||||||||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||||||||||||||
This section lists figure types that are slightly more complex. Some of them need calculation (e.g. a histogram and a box plot) and others use a predefined combination of settings - making your life more easy.
A ‘fan chart’ is a special case of bandwidth plot. It always follows
one and the same structure: one line, followed by three confidence
intervals with fixed colors. Parameter style= fan
initializes three parameters. Firstly, parameter palette for colors, secondly
parameter type for the time
series types conform the CPB style. I.e., first a rose line,
followed by three blue intervals with increasing intensities. This figure shows the color palette. You
can re-use these colors in the case you want to customize your fan
chart. Thirdly, the four items in the legend are put in one and the same
column (legend_n_per_column = 4).
|
|
Relevant parameters:
|
||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||
Parameter style = fan sets colors and types for standard
fans with one line, followed by three bandwidths. Using this style
entails the following settings. type: line, area, area,
area, area, area, area, legend_n_per_column: 4,
palette: fan. So, using styles saves the time and the
effort to implement each setting manually.
You can use style= ppower to
produce standardized purchasing power plots. An example:
|
|
Relevant parameters:
|
||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||
Please be careful and take a look at the settings resulting from the
ppower style:
type: dot, line, line, line, title:
Koopkrachtontwikkeling, x_title: bruto huishoudinkomen (dzd
euro), y_title: verandering koopkracht (%),
dot_shape: ., x_scale: 1E-3,
scale: 100, legend_n_per_column: 4,
hline_bold: 0, palette: ppowerThese settings include a scaling of both the x- and the y-axis automatically.
This section shows how you can use James to create a basic histogram
of one single vector of data with parameter
style = histogram. You can use the following parameters to
tweak your histogram.
hist_breaks:
number of cells (bars) you want in
the histogram. If you leave this empty, James will do an educated guess.
The value is of type ‘numeric’. Example(s):
10.
hist_freq:
if y, the histogram
graphic is a representation of frequencies (i.e. counts). If
n, probability densities are plotted so that the histogram
has a total area of one if you set bar_gap_fraction = 0.
The value is of type ‘bool’. For the
default style the value is y. See also
parameter(s): bar_gap_fraction.
An example of a histogram:
|
|
Relevant parameters:
|
||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||
If you want to enrich your histogram with other time series, you should consider the histogram as a special case of a bar plot and manually add its x- and y-values to the data tab. Doing so enables to add other time series to your plot as well.
Parameter type = heatmap makes James show a given matrix
as heatmap. James uses the WYSIWYG-principle (what you see is what you
get) for heatmaps. Except for the x-axis, which is defined on top of
your data and shown at the regular place at the bottom of your figure,
the rest of data are shown in the same order as you put them in your
data tab. So, the upper left data value is shown upper left corner in
the heatmap, too. Below 11 values, the axes values are shown ‘as is’ on
the axes in your figure. Above 10 values James calculates sensible axis
values (if the values are numeric). You can override this behaviour with
parameters heatmap_x_axis_asis and
heatmap_x_axis_asis.
Based on the values you want to highlight in your figure, you can pick a color palette. The color palets are:
palette_heatmap_low_high to stress both low and high
values in the heatmappalette_heatmap_low to stress low valuespalette_heatmap_high [default] to stress high
valuespalette_heatmap_middle to stress values in the middle
of the rangeParameter heatmap_z_lim by default equals min and max
value in the data (you can overrule this, e.g. to get nice rounded
values in your legend). The min (max) value is associated with the first
(last) color in the color palet. James uses linear interpolation of the
palette to pick a color for a given value between min and max.
The first example repeats one of the above figures showing the number of phones in the world per year in different parts of the world.
Here we must set heatmap_x_axis_asis = yes because the
values on the x-axis (i.e. the years) are not equidistant. This is
because James can’t deal with unequally spaced values on one of the axes
in case of a heatmap. The default number of decimals of values in the
legend is set to two. Because we deal with integer numbers here, we set
heatmap_legend_labels_n_decimals = 0. Because the default
color palette highlights high values in the figure, which is what we
want, there is no need to define the palette.
|
|
Relevant parameters:
|
||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||
The following figure shows another example with real data. It requires no special settings.
|
|
Relevant parameters:
|
||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||
The following figure shows two mexican hats, each generated with the
addition of two normal distributions. The hat at the left side points
down (i.e. ‘in the paper’), while the one at the right side points up
(‘i.e. out of the paper’). The following figure highlights both high and
low values by making use of the palette_heatmap_low_high
palette.
|
|
Relevant parameters:
|
||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||
Same figure, but now highlighting low values:
|
|
Relevant parameters:
|
||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||
In some cases you may not want to highlight values at the extremes of
the spectrum, but rather the values in the middle. In such cases you may
choose for the palette_heatmap_middle palette.
|
|
Relevant parameters:
|
||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||
The last figure uses the palette_heatmap_high palette.
This palette highligths high values.
|
|
Relevant parameters:
|
||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||
Parameters to tweak your heatmap.
heatmap_legend_labels:
labels in legend. Should
have same number of values as parameter ‘heatmap_legend_values’. The
value is a list with elements of the type ‘string’ separated by ‘;;’. Example(s):
min;; mid;; max. See also parameter(s): heatmap_legend_values, heatmap_legend_n_items, heatmap_legend_labels_n_decimals.
heatmap_legend_labels_big_mark_show:
for the
values in the legend, use yes (or no) if you
(do not) want a character between every three digits left of the decimal
separator. The value is of type ‘bool’.
Example(s): y, n. For the heatmap style the value
is y.
heatmap_legend_labels_n_decimals:
number of
decimals of values in heatmap legend. The value is of type ‘numeric’. Example(s): 0, 1, 2.
For the heatmap style the value is 2. Figure(s)
using ‘heatmap_legend_labels_n_decimals’:
Number of phones in the world.
heatmap_legend_n_items:
sets number of items in
legend. Leave equal to make the number equal to the maximum of 4 and the
number of colors in the color panel. The items are equally spaced from
min to max value in data. The value is of type
‘numeric’. Example(s): 2, 5, 10.
heatmap_legend_values:
values for labels in
legend. If not specified, then the number of values is set equal to the
value of parameter ‘heatmap_legend_n_items’. Should have same number of
values as parameter ‘heatmap_legend_labels’ if the user speficies that
parameter. The value is a list with elements of
the type ‘numeric’ separated by ‘,’.
Example(s): 0, 50, 100. See also parameter(s): heatmap_legend_labels, heatmap_legend_n_items.
heatmap_line_col:
colour of line around each
rectangle in heatmap. The value is of type
‘string’. See also parameter(s): heatmap_line_width.
heatmap_line_width:
width of line around each
rectangle in heatmap. The value is of type
‘numeric’. For the heatmap style the value is 1.
See also parameter(s): heatmap_line_col.
heatmap_x_axis_asis:
if y, then each
value on the x-axis is shown ‘as is’ and copied exactly from your data
tab. If n (only applicable for numbers), James will
construct an axis with values, just like in a normal figure The value is
of type ‘bool’. Example(s): y, n.
See also parameter(s): heatmap_y_axis_asis. Figure(s)
using ‘heatmap_x_axis_asis’: Number of phones
in the world.
heatmap_y_axis_asis:
analog to
‘heatmap_x_axis_asis’ for the y-axis. The value is of type ‘bool’. Example(s): y, n. See
also parameter(s): heatmap_x_axis_asis.
heatmap_z_lim:
range for values in heatmap.
Defaults to min/max of data. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
0, 100. Figure(s) using ‘heatmap_z_lim’:
Number of phones in the world.
The default box
plot in James shows quantities
box_quantiles = 0, 0.25, 0.5, 0.75, 1. You can create a
box-plot with style = box-plot. The line in the figure
below runs from min to max. The box runs from the 25%
- 75% quantile (second and fourth value of the parameter
box_quantiles). The second figure below shows how you may
remove the box from the figure by making the second and fourth quantile
equal to the third value. The third value of box_quantiles
by default indicates the 50% quantile.
This style entails the following settings. style:
no-legend, y_title_v_shift: 0.3 cm,
box_gap_fraction: 0.5, box_median_lab_show: y,
margin_north: 0.95 cm. Please note that the use of
style = no-legend in the ‘Relevant parameters’ below is
redundant and can be omitted. Style no-legend is already
included in style box-plot.
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||
The following figure is an example how to adjust the box plot. This
figure removes the box by adjusting the box_quantiles as
explained above. Please note, this figure does not use
style = box-plot (see previous paragraph for details on
this style). If we want to show the median labels, we have to
explicitely indicate that by box_median_lab_show= y.
|
| ||||||||||||||||||||||||||||||
|
Relevant parameters: | ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. |
List of box-plot figures: Inkomenseffecten plannen socialezekerheids- en belastingstelsel, Kans om in risicogroep te zitten.
box_col_all_equal:
if y, all boxes
get the same color. The value is of type
‘bool’. For the default style the value is n.
Figure(s) using ‘box_col_all_equal’: Kans om in
risicogroep te zitten.
box_col_per_group:
usually you want one color per
group (y). But you may choose to give each box its own
color. The value is of type ‘bool’. For the
default style the value is y.
box_gap_fraction:
not documented yet. The value
is of type ‘numeric’. For the default
style the value is 0.2. For the box-plot style the
value is 0.5.
box_lab_big_mark_show:
for the values
(e.g. median) in box plots, use y if you want a character
between every three digits left of the decimal separator. The value is
of type ‘bool’. For the default style
the value is y.
box_median_col:
if empty, same color as box. The
value is of type ‘string’. Example(s):
gray30. Figure(s) using ‘box_median_col’:
Kans om in risicogroep te zitten.
box_median_lab_font_size:
scale font size of
label next to median The value is of type
‘numeric’. Example(s): 1. For the default style
the value is 0.7.
box_median_lab_n_decimals:
number of decimals of
value in label The value is of type ‘numeric’.
For the default style the value is 2. Figure(s)
using ‘box_median_lab_n_decimals’: Kans om in
risicogroep te zitten.
box_median_lab_show:
show median value next to
median The value is of type ‘bool’. For the
default style the value is n. For the
box-plot style the value is y. Figure(s) using
‘box_median_lab_show’: Kans om in risicogroep te
zitten.
box_median_lab_suffix:
pasted after median value.
Please note that by default James trims whitespaces at start and end of
strings. You can use ‘’ (without quotes) to add the whitespace
character. The value is of type ‘string’.
Example(s): %, \s%. Figure(s) using
‘box_median_lab_suffix’: Kans om in risicogroep te
zitten.
box_median_line_extension_factor:
put at zero to
make length equal to box_width. The value is of type ‘numeric’. Unit: ‘fraction of box_width’. For
the default style the value is 0.2.
box_median_shape:
0 = line, rest is symbols like
in R (try 19 for filled dot). The value is of type ‘numeric’. For the default style the
value is 0. Figure(s) using ‘box_median_shape’:
Kans om in risicogroep te zitten.
box_median_shape_size:
not documented yet. The
value is of type ‘numeric’. For the
default style the value is 0.5.
box_name_as_x_lab:
not documented yet. The value
is of type ‘bool’. For the default
style the value is y.
box_quantiles:
not documented yet. The value is a
list with elements of the type ‘numeric’ separated by ‘,’. For the
default style the value is 0, .25, .5, .75, 1.
Figure(s) using ‘box_quantiles’: Kans om in
risicogroep te zitten.
James supports maps on two scales: The Netherlands and the world.
With style = map you can create a map of The
Netherlands. Doing so entails the following settings.
legend_y: 1.08 cm, margin_south: 1.5 cm,
margin_west: 0.5 cm, margin_north: 0.8 cm,
margin_east: 0.5 cm, palette: palette_map.
This section explains how to create a figure with a geographic map of different regions, each with a given color. A color may be either given directly or be interpolated based on a given value.
The following box provides an overview of the type of regions of The Netherlands you can choose from:
Regions you can choose from. [Please beware that you should append a year to the following regions (e.g. arbeidsmarktregio_2020)!] Arbeidsmarktregio, Arrondissementsgebied, Brandweerregio, Buurt, COROP-gebied, COROP-plusgebied, COROP-subgebied, Gemeente, GGD-regio, Grootstedelijke aglomeratie, Jeugdregio, Kamer van Koophandelregio, Landbouwgebied, Landbouwgroep, Landsdeel, NUTS1, NUTS2, NUTS3, Politieregio, Provincie, Regionaalmeld Coordinatiepunt, Regionale Eenheid, RES-regios, Ressort, RPA-gebied, Stadsgewest, Toeristengebied, Toeristengroep, Veiligheidsregio, Veiligthuisregio, Wijk, Zorgkantoorregio.
These items are available for different years. The maps are downloaded on the fly. CBS explains here and here how to work with PDOK maps in R.
The following subsections explain step by step how to start creating your own custom geographic map.
You start with selecting a specifc map from Appendix: CBS Geo-regions and
assign that value to parameter geo_cbs_map. Next, with
parameter style you indicate
that you want to create a map. As last, you set parameter tab to a non-existing data tab.
For example, your meta-tab could look as follows.
| Parameter | Value |
|---|---|
tab |
data |
style |
map |
geo_cbs_map |
arbeidsmarktregio_2020 |
Doing so will result in a map that divides The Netherlands in so-called arbeidsmarktregio’s in the year 2020.
After saving your file, you can run James for the first time. If the tab you refer to does not exist yet (important!), James will create a new tab with the given name, fill it with data (see next step) and create the following figure.
|
|
Relevant parameters:
|
||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||
After running James, you can find the freshly created data tab after closing and re-opening your xlsx file. In the data tab, you’ll find four columns:
region with the region names for the chosen
geo_cbs_map
code with the corresponding region codes
region names
only if you remove the codes columnvalue with a unique integer for each region
label with numbers 1, 2, … as an example label for each
region
To be complete, there is one more column which you can add too (not yet present):
color so you can ‘manually’ set colors
sun to region ZeelandThe figure below equals the figure above, after the following modifications.
palette holds one
color more (+rose)geo_col_threshold
with values for the colors in the palette (1 = anakiwa, 18.5 =
endeavour, 36 = rose); Section ‘Colors’ explains
the use of colors in detailname and
name_col to specify the
legend; Section ‘Legend’ explains in detail how
you can further tweak or remove the legendfootnote and a title|
|
Relevant parameters:
|
||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||
Next to region names, it’s also possible and probably preferable to make use of codes to identify regions. The following figure does so. The head of its data tab lists:
| code | value |
|---|---|
| GM1680 | 1 |
| GM0738 | 1 |
| GM0358 | 0 |
| GM0197 | 1 |
| GM0059 | 1 |
| GM0482 | 1 |
|
|
Relevant parameters:
|
||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||
The Netherlands is divided in several ways in different regions. You
can use these parameters to choose which devision you want to use. You
may add items to the legend with parameter name. The items
in the legend will be colored in the same order as the colors in your
palette. See also parameter(s): name, palette.
geo_border_col:
not documented yet. The value is
of type ‘string’. Example(s):
black. For the default style the value is
gray.
geo_border_lwd:
not documented yet. The value is
of type ‘numeric’. Example(s): 1.
For the default style the value is 0.5.
geo_cbs_available_maps:
not documented yet. The
value is of type ‘path’. For the
default style the value is ext/geo/cbs-maps.RData.
geo_cbs_map:
this parameter specifies a specific
division of The Netherlands in regions. See appendix of manual for the
full list of options currently available. The value is of type ‘string’. Example(s):
arbeidsmarktregio_2018. Figure(s) using ‘geo_cbs_map’:
geo-first-example,
Arbeidsmarktregio’s in 2020 volgens CBS,
Participatie gemeenten.
geo_cbs_url_base:
first part of url that is used
to download geographic data originating from CBS. Please edit the url if
you need to. The value is of type ‘string’. For
the default style the value is
https://geodata.nationaalgeoregister.nl/cbsgebiedsindelingen/wfs?request=GetFeature&service=WFS&version=2.0.0&outputFormat=json&typeName=cbs_.
geo_cbs_url_centroid:
part of url that is pasted
after the region name (for centroids so labels can be placed). The value
is of type ‘string’. For the default
style the value is _labelpoint.
geo_cbs_url_polygon:
part of url that is pasted
after the region name (for polygons). The value is of type ‘string’. For the default style the
value is _gegeneraliseerd.
geo_col_threshold:
the order of the values of
this parameter correspond to the order of the colors in your palette.
Regions with the first (second, third, etc.) value will get the first
(second, third, etc.) color from your palette. Regions with other values
will be be colored by linear interpolation of the colors in your
palette. Regions with values outside the range of this parameter will
get the figure’s background color. The values in this parameter must be
stricktly increasing. The value is a list with
elements of the type ‘numeric’ separated by
‘,’. Example(s): 0, 100. See also parameter(s): palette, palette_blue. Figure(s) using
‘geo_col_threshold’: Arbeidsmarktregio’s in
2020 volgens CBS.
region_label_col:
not documented yet. The value
is of type ‘string’. Example(s):
white. For the default style the value is
black.
region_label_font_size:
relative font size. The
value is of type ‘numeric’. Example(s):
0.7, 1.5. For the default style the value is
1.
region_label_font_style:
1 = normal, 2 = bold, 3
= italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s):
1, 2, 3, 4. For the default style the value is
3.
The following figure uses style = world-map to show a
map of the world with CPB-style colors, added green. This style entails
the following settings. style: wide, width:
15.5 cm, height: 8.5 cm, margin_south: 0 cm,
margin_west: 0 cm, margin_north: 0.5 cm,
margin_east: 0 cm, palette: palette_world_map,
world_map_projection: +proj=hatano,
world_map_country_border_col: white,
world_map_country_border_lwd: 1,
world_map_country_no_data_col: gray95,
world_map_ocean_col: anakiwa,
world_map_ocean_border_col: anakiwa,
world_map_threshold: -2.0, -1.5, 0, +1.5, +2.0,
world_map_threshold_legend_n_decimals: 1,
world_map_legend_font_col: endeavour,
world_map_legend_font_size: 1.3,
world_map_title_bg_col: endeavour,
world_map_title_col: white,
world_map_title_font_size: 2.1,
world_map_value_n_decimals: 1,
world_map_value_symbol: %,
world_map_value_font_size: 3,
world_map_value_col: white,
world_map_legend_dot_size: 0.5,
world_map_legend_dot_col: anakiwa.
|
| ||||||||
|
Relevant parameters: | ||||||||
| ||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. |
Because the figure is in English, it uses
style = english too.
Please note that the use of style = wide in the
‘Relevant parameters’ above is redundant and can be omitted. The use of
style = world-map already includes
style = wide. The same remark is valid for all ‘world
figures’ below.
You can specify the countries following the ISO 3166-1 standard for either alpha-2 two letter country codes, or alpha-3 three letter country codes. James is not case sensitive here, so you can use both uppercase and lowercase.
The above figure uses the alpha-2 standard, in which, for example, The Netherlands is represented with ‘NL’. This alpha-2 standard is used most prominently for the Internet’s country code top-level domains (with a few exceptions). The alpha-3 standard on the other hand represents The Netherlands with ‘NLD’.
Currently, James uses the R-package
rnaturalearthto represent the world. Unfortunately, this package does not exactly follow the above standards for the following countries: Kosovo (KOS), Palestine (PSX), Somaliland (SOL), South Sudan (SDS), Turkish Republic of Northern Cyprus (CYN) and Western Sahara (SAH). If you need these countries, please use the alpha-3 standard plus the abbreviations shown here.
If you want a more fancy layout of the title, you can use
style = world-map-www.
|
| ||||||||
|
Relevant parameters: | ||||||||
| ||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. |
This layout also enables you to set a value for the title (parameter
world_map_value).
The value appears at the right size of the title with the blue
background. The background color of the value is automatically adapted
based on the thresholds (world_map_threshold)
and colors set in the legend. Please note that the palette parameter sets the
corresponding colors (parameter palette_world_map
holds the default colors). The horizontal size of the blue background of
the title scales with its content.
|
| ||||||||||
|
Relevant parameters: | ||||||||||
| ||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. |
world_map_country_border_col:
not documented yet.
The value is of type ‘string’. For the
world-map style the value is white.
world_map_country_border_lwd:
not documented yet.
The value is of type ‘numeric’. For the
world-map style the value is 1.
world_map_country_no_data_col:
not documented
yet. The value is of type ‘string’. For the
world-map style the value is gray95.
world_map_legend_dot_col:
not documented yet. The
value is of type ‘string’. For the
world-map style the value is anakiwa.
world_map_legend_dot_size:
not documented yet.
The value is of type ‘numeric’. For the
world-map style the value is 0.5.
world_map_legend_font_col:
not documented yet.
The value is of type ‘string’. For the
world-map style the value is endeavour.
world_map_legend_font_size:
not documented yet.
The value is of type ‘numeric’. For the
world-map style the value is 1.3.
world_map_ocean_border_col:
not documented yet.
The value is of type ‘string’. For the
world-map style the value is anakiwa.
world_map_ocean_col:
not documented yet. The
value is of type ‘string’. For the
world-map style the value is anakiwa.
world_map_projection:
maps are flat (2D), while
the earth is a sphere (3D). Here you can choose which projection you
want to use to project the 3D earth on a 2D flat. https://proj.org/operations/projections/index.html
contains an overview. Please use the ‘proj-string’ below the image. See
for example the default projection (‘hatano’) which we use: https://proj.org/operations/projections/hatano.html. The
value is of type ‘string’. For the
world-map style the value is +proj=hatano.
world_map_threshold_legend_n_decimals:
not
documented yet. The value is of type ‘numeric’.
For the world-map style the value is 1.
world_map_title_bg_col:
not documented yet. The
value is of type ‘string’. For the
world-map style the value is endeavour.
world_map_title_col:
not documented yet. The
value is of type ‘string’. For the
world-map style the value is white.
world_map_title_font_size:
not documented yet.
The value is of type ‘numeric’. For the
world-map style the value is 2.1.
world_map_value:
not documented yet. The value is
of type ‘numeric’. Figure(s) using
‘world_map_value’: World trade volume
change last month:.
world_map_value_col:
not documented yet. The
value is of type ‘string’. For the
world-map style the value is white.
world_map_value_font_size:
not documented yet.
The value is of type ‘numeric’. For the
world-map style the value is 3.
world_map_value_n_decimals:
not documented yet.
The value is of type ‘numeric’. For the
world-map style the value is 1.
world_map_value_symbol:
not documented yet. The
value is of type ‘string’. For the
world-map style the value is %.
Time series often have a known part (usually in the past) and a
predicted part (e.g. in the future). You can use parameter forecast_x to indicate
from which point on your data is predicted. Parameter
forecast_x is defined as the time point (read:
x-value) that is separates the observed past from the
forecasted future. Values larger than forecast_x are considered
to be forecasted. The area of the figure that corresponds to the
forecast is marked with a white rectangle containing the text ‘raming’
by default or ‘prognosis’ if style = english.
If your figure has bars, however, the true value of
forecast_x may coincide with a bar or with a stack of bars.
In that case you may want to tweak the value of forecast_x
so the white rectangle starts left of the bar. The following figure
illustrates this.
|
|
Relevant parameters:
|
||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||
The following figure uses the data of the previous figure. The
stacked bars (bar=), are replaced with stacked areas
(area=). Forecasted (stacked) areas are marked with white
diagonal lines. Further there are two differences. Firstly, because the
figure does not contain bars, the forecast can start at exactly the
desired position (i.e. 1958). Secondly, by removing
style = english, the languages is changed to Dutch. This
has an effect on the logo, on the text marking the forecast (now:
raming) and on thousands separator at the y-axis.
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||
forecast_below_gridline:
text above or below
upper gridline. The value is of type ‘bool’.
For the default style the value is y.
forecast_bg_col:
background color for
forecasting. The value is of type ‘string’. For
the default style the value is #ffffff. For the
kansrijk style the value is gray95.
forecast_bg_show:
show background color behind
forecasted part of series. The value is of type
‘bool’. For the default style the value is y.
forecast_col_transparency:
forecasted areas/bars
have this transparency level. Zero means no transparancy, one means full
transparancy. PLEASE REMOVE THIS PARAMETER. NO LONGER USED. WE NOW
‘shade’ BARS/AREAS The value is of type
‘numeric’. Unit: ‘fraction (0..1]’. Example(s):
0.3, 0.5, 0.7. For the default style the value is
0.
forecast_font_size:
size of forecast_text. The
value is of type ‘numeric’. For the
default style the value is 0.9.
forecast_font_style:
1 = normal, 2 = bold, 3 =
italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s):
1, 2, 3, 4. For the default style the value is
3.
forecast_shading_angle:
slope of shading lines,
given as an angle (counter-clockwise). The value is of type ‘numeric’. Unit: ‘degrees’. Example(s):
0, 45, 90, 135. For the default style the value is
45.
forecast_shading_col:
color of forecast shading.
Default color is background color of the figure. The value is of type ‘string’. For the default style the
value is bg_col.
forecast_shading_col_transparency:
transparency
of shading. The value is of type ‘numeric’.
Unit: ‘fraction (0..1]’. Example(s): 0.3, 0.5, 0.65. For
the default style the value is 0.65.
forecast_shading_density:
density of shading of
areas and bars that are forecasted. The value is of type ‘numeric’. Unit: ‘cm^-1’. Example(s):
5, 10, 20. For the default style the value is
10.
forecast_shading_show:
by default shading is
added to forecasted bars/areas. The value is of type ‘bool’. For the default style the
value is n.
forecast_text:
text that marks the start of the
forecast. The value is of type ‘string’. For
the default style the value is raming. For the
english style the value is prognosis.
forecast_text_col:
color of the forecast_text.
The value is of type ‘string’. For the
default style the value is brown.
forecast_text_show:
add text at top of plot (or
right side for turned plots) to mark start of forecast. The value is of
type ‘bool’. For the default style the
value is y.
forecast_x:
the x-value (usually a date) that
separates observed values from predicted values. The value is of type ‘numeric’. Figure(s) using ‘forecast_x’:
Bbp tijdens crises,
Forecasted from 1958,
Geraamd vanaf 1958.
James has a parameter style, which enables you to
quickly change the layout of your figure. Each style defines a unique
combination of settings. Some styles you can combine (not all, because
some contradict each other, e.g. the dimension styles).
The default dimensions of a figure are width 7.5 cm by
height 7.5 cm. You can change this by setting the
style parameter with one of the following values. James
will automatically adjust all internal figure margins accordingly.
style = small for a slightly smaller figure. This is
the standard for figures in a so-called ‘frame’ (Dutch: ‘kader’).
width: 6.8
cm, height: 6.8 cmstyle = big for figures with a lot of information
(e.g. a barplot with many bars and labels on top of them).
width: 15
cm, height: 15 cmstyle = tall for figures that need extra vertical space
in your text document.
height: 15.5
cmstyle = slide to fit the dimensions of a PowerPoint
slide that has two figures on it.
width: 14.2
cm, height: 11.7 cmstyle = slide-wide to fit as a landscape image on a
PowerPoint slide.
width: 21
cm, height: 11.7 cm, margin_south: 2.8 cmstyle = wide for figures that need extra horizontal
space in a text document.
width: 15.5
cmIt does not make sense to combine these.
style = no-legend if you want to use the (legend) space
below the plot for the plot too. The advantage of this style is that it
does not affect the dimensions of your plot. If you don’t want to extend
the plotting region (e.g. to be consistent with other plots),
but don’t want a legend, please use legend_show = n.
x_ticks_length: -0.02, legend_show: n,
margin_south: 1.25 cmstyle = no-title if you want a title and want to extend
your plot to the (title) space.
margin_north: 0.7 cmThe above two subsections explain how the figure’s size, dimensions
and margins can be configured by setting just the style
parameter at one single value. In almost all cases the corresponding
changes of margins and shifts of elements should result in a nice
layout. However, in some special cases you may want to have more grip on
the precise values. In those cases you can take a look at the following
parameters. Still, the style parameter should do most of
the job and the following parameters should be considered for finetuning
only.
height:
height of the resulting image. The value
is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 7.5. For the
small style the value is 6.8. For the
kansrijk style the value is 7. For the
big style the value is 15. For the slide
style the value is 11.7. For the slide-wide style
the value is 11.7. For the tall style the value is
15.5. For the world-map style the value is
8.5. For the world-map-www style the value is
9.
labels_margin_left:
margin left of title,
y_title, y_lab. Same margin is used at right side of main title if it is
automatically rescaled if it grows to wide. The value is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 0.45.
labels_margin_right:
margin right of x_title. The
value is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 0.45.
margin_east:
margin right of plotting area. The
value is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 0.635. For the
map style the value is 0.5. For the
world-map style the value is 0. For the
world-map-www style the value is 0.
margin_north:
margin above plotting area. The
value is of type ‘numeric’. Unit: ‘cm’.
Example(s): 1.524. For the default style the value
is 1.3. For the box-plot style the value is
0.95. For the map style the value is
0.8. For the world-map style the value is
0.5. For the world-map-www style the value is
1. For the no-title style the value is
0.7.
margin_north_extra:
not documented yet. The value
is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 0. For the
x-top style the value is 0.2.
margin_south:
margin below plotting area. The
value is of type ‘numeric’. Unit: ‘cm’.
Example(s): 1.905. For the default style the value
is 2.3. For the slide-wide style the value is
2.8. For the map style the value is
1.5. For the world-map style the value is
0. For the world-map-www style the value is
0. For the no-legend style the value is
1.25. For the interactive style the value is
3.
margin_west:
set automatically for most styles.
Sum of maximum width of your labels, plus margin_west_delta. The value
is of type ‘numeric’. Unit: ‘cm’. For the
map style the value is 0.5. For the
world-map style the value is 0. For the
world-map-www style the value is 0.
margin_west_delta:
this is added to margin_west.
margin_west is dynamically calculated based on actual width of your
y_lab‘s, the labels_margin_left and
y_lab_margin_right. This is to guarantee identical
alignment of all your labels at the left side of the plot. The value is
of type ’numeric’. Unit: ‘fraction of width’.
For the default style the value is 0. For the
interactive style the value is -0.04.
width: width
of the resulting image. The value is of type
‘numeric’. Unit: ‘cm’. For the default style the value is
7.5. For the small style the value is
6.8. For the kansrijk style the value is
12.5. For the big style the value is
15. For the slide style the value is
14.2. For the slide-wide style the value is
21. For the wide style the value is
15.5. For the world-map style the value is
15.5.
y_lab_margin_right:
margin between y_lab and
plotting area. The value is of type ‘numeric’.
Unit: ‘fraction of width’. For the default style the value is
1.4999999999999999E-2.
Parameter turn with value
turn = y (or turn = TRUE) swaps the
x- and y-axes of your plot:
|
|
Relevant parameters:
|
||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||
Kansrijk figures don’t have a title, are wider, have a white
background and use a different color palette for the time series.
Parameter style = kansrijk will apply the Kansrijk
style to your figure, which entails the following settings.
style: no-title, forecast_bg_col: gray95,
width: 12.5 cm, height: 7 cm,
bg_col: #ffffff, palette: kansrijkAn example figure in the Kanskrijk style:
|
| ||||||||||||||
|
Relevant parameters: | ||||||||||||||
| ||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. |
This manual contains a section specifically on bar-plots that explains in detail how you can create your own custom bar-plot.
This section discusses specific figure elements which should enable you to create most of the figures.
Obviously, you can set the title of your figure with the parameter title. If your title is too
broad for your figure, you may add a newline with \n to
your title. If your figure is (still) too broad, James will autoscale it
smaller to make it fit the margins. Please beware, if this happens, your
plot doesn’t comply anymore with the CPB-style.
If you don’t want a title, you can set style = no-title.
Same for the legend. The following figure has no title and no
legend.
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||
Because a title is specfied in the above case, James will give you a trivial warning:
## WARNING ## While your style includes 'no-title', you have specified a title. This seems contradictionary.
You may add extra information, e.g. the source, to the figure by inserting a footnote. By default, the footnote is italic black, aligned bottom right. The following figure shows a footnote that is more prominent but visually less attractive.
|
|
Relevant parameters:
|
||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||||
A footnote may refer to a text label (e.g. title) in your figure. In that case, you may want to use a ¹, ², ³, or * in both the text label and the footnote.
footnote:
footnote, placed at bottom of figure,
aligned right by default. The value is of type
‘string’. Example(s): ¹this is a footnote. Figure(s) using
‘footnote’: Six different line types,
Oversterfte in 2020,
Heatmap stressing low and high values,
Heatmap stressing low values,
Heatmap stressing high values,
Heatmap stressing middle values,
Bestaande koopwoningen,
Eerste indruk: corona treft ouderen
buitenproportioneel, Tweede
indruk coronadoden: relatief geen verschil 65-80 en 80+,
Forecasted from 1958,
Bestaande koopwoningen,
Investeringen in Nederland¹ door de zwaarst-
getroffen eurolanden in 2018 en vice versa,
Standard normal distribution,
Arbeidsmarktregio’s in 2020 volgens CBS,
Participatie gemeenten,
World import, customs or balance of payments
(prices), change in july, 2020., World
trade volume change last month, World
trade volume change last month:, Verlies van
banken na afschrijving 20% van de overheidsschuld van GIIPS-landen,
Toeslagen,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
VMBO,
Two series of whiskers in one plot,
Mathematical expression in legend.
footnote_col:
not documented yet. The value is of
type ‘string’. For the default style
the value is black. Figure(s) using ‘footnote_col’:
Six different line types,
Tweede indruk coronadoden:
relatief geen verschil 65-80 en 80+,
Toeslagen,
VMBO.
footnote_font_size:
size of footnote text. The
value is of type ‘numeric’. For the
default style the value is 0.85.
footnote_x:
distance from left/right side of
figure. The value is of type ‘numeric’. Unit:
‘cm’. For the default style the value is 0.25.
footnote_y:
distance from bottom/top of figure.
The value is of type ‘numeric’. Unit: ‘cm’. For
the default style the value is 0.15.
By default James produces axes with nice values and a suitable number of digits. This section explains how to tweak your axes.
Parameter x_lim_follow_data= y
zooms in on the x-axis and gets rid of the margins left and right of
your graph (at the cost of nice labels on the x-axis).
|
|
Relevant parameters:
|
||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||
With parameter x_lim you
can set the range of the x-axis by hand. This may however lead to
undesired results. The following figure illustrates what may happen.
|
|
Relevant parameters:
|
||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||
You may observe two issues. First, the data shows up in the left and right margin of the figure because James plots the series outside the range of your x-axis. Second, the zoom on the y-axis is unnaturally small.
You may prevent these issues in two ways. You can manually remove the
data outside the scope from your data tab. The most easy way, however,
is to let James remove the data for you. You can do so by setting
parameter x_keep to the
range that should be kept.
|
|
Relevant parameters:
|
||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||
If the x-axis in your xlsx-file is in the Excel ‘Date format’, then
parameter x_lab_date_show will
default to yes and thus dates are shown on the x-axis
instead of numeric values. If x-values in your xlsx-file are numeric
(not dates), you can set x_lab_date_show = yes yourself.
Analogous to parameter x_at,
which can be used to set the numeric positions on the x-axis where you
want labels (e.g. 2020.5), you can use parameter x_at_date if you prefer to
use a date format (e.g. 2020-07-01). The format to specify dates here
are: yyyy-mm-dd, yyyy-mm, yy-m, yy-m-d or a combination of those
formats.
Parameter x_date_format sets the
format in which the dates show up on your x-axis. You can use a wide
variety of formats, including but not limited to:
dd-mm-yyyy, d month_full yyyy, yyyy/month, month, d-m-yy, d-mm-'yy, d-month-'yy, month yyyy, month_full\nyyyy.
The idea is that dd and d are replaced by the
day of the month. For days 1..9, d will show up as 1..9,
and dd as 01..09. Same for mm and
m concerning the month of the year. But you can also use
the month’s name (either abbreviated: month, or full:
month_full). Default is Dutch but
style = english translates the month names to English. You
can use the separator you want, e.g. - or /.
Years can be displayed in either four or two digits.
You can use the following parameters to customize dates.
x_at_date:
position in terms of dates at which
you want labels at the x-axis. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s):
yyyy-mm-dd, yyyy-mm, yy-m, yy-m-d or a combination.. See
also parameter(s): x_at, x_lab, x_date_format. Figure(s) using
‘x_at_date’: Tozo-uitkeringen per maand.
x_date_format:
defines the date format for date
labels on the x-axis. A ‘d’ stands for the day of the month. Two d’s
(‘dd’) will ensure that days will always have two digits (e.g., not 1
but 01). Same for the number of the month: ‘m’, ‘mm’, respectively. A
‘q’ indicates the quarter of a year (1-4). Using ‘month’ will replace
the number of the month by its abbreviated name. Use ‘month_full’ to get
the full name. Setting ‘style = english’ will translate Dutch month
names to English. Year can be either two or for digits: yy or yyyy. You
can use the separator you want (e.g. ‘-’, ‘/’, or a whitespace ’ ‘). You
can also choose to use a newline () so move the second part of your date
to the next line. Please note that you can use a quote to abbreviate
yyyy to ’yy. The value is of type ’string’.
Example(s):
m-yyyy, dd-mm-yyyy, d month_full yyyy, yyyy/month, month, d-m-yy, d-mm-'yy, d-month-'yy, month yyyy, month_full\nyyyy, qq-yyyy.
For the default style the value is yyyy. See also
parameter(s): month_nl, month_en, month_nl_full, month_en_full, x_lab_date_show. Figure(s) using
‘x_date_format’: Economische groei in
Nederland, No auto-scaling,
The use of y_r_lim,
Tozo-uitkeringen per maand.
Time series are often have dates on the x-axis. With parameter x_ticks_date you can
easily set ticks of a different length.
|
|
Relevant parameters:
|
||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||
By default the labels on your axes don’t get emphasis. You can
however emphasize specific labels by making them bold
and/or italic. The following figure has text labels at both
axes, withouth empasis, in bold, in italic and in italic-bold,
respectively. Parameter x_lab_bold, for example,
indicates the indices of the bold labels at the x-axis. Please note that
the labels are numbered 1, 2, 3, and so on. Likewise you can use x_lab_italic to make
labels italic. Comparable paramters exist for the y-axis. For the axis
at the top (style = x-top) and at the right side
(style = y-right), text labels can’t be emphasized in the
current version.
|
|
Relevant parameters:
|
||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||
You can use parameters x_axis_show and y_axis_show to hide both
axes.
|
|
Relevant parameters:
|
||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||
Please note that the figure above uses long dashes (line_lty= 2),
while the adviced default is short dashes (line_lty= 3).
You can use the following styles to add an extra axis.
style = x-top the x-top style creates
extra space for an axis at the top of your figure.
y_title_align: right, margin_north_extra: 0.2
cmstyle = y-right the y-right style creates
extra space for a secondary y-axis at the right of your plot.
If you want to change the values put on the axis by James, you can
use parameter x_lab and y_lab.
If at least one of the values on the x-axis contains a letter, then
James treats all values as text. It may however happen that all the
values on the x-axis are numeric while you want them to be treated as
text. In that case you can use parameter x_lab_as_text= y
to space the numbers on the x-axis equidistant. You can add a thousand
mark with x_lab_big_mark_show= y
if you don’t deal with e.g. years on the x-axis. You can switch
to English separators by style= english.
Lastly, you can change the precision of the values on the x-axis with
parameter x_n_decimals. More
details in the following subsection.
If your figure has bars (bar-- or bar=) or
stacked areas (area=), by default there will be a bold
gridline at y = 0. For other figures, only if there is a
gridlines is at height *y* = 0, that gridline is made bold
(c.f. x_axis_bold_if_zero).
You can manually choose to add a bold horizontal line to your figure
by setting hline_bold
to the desired y-value. Parameters hline_lwd and hline_col adjust the lines
thickness and color, respectively.
It is easy to adapt the layout of the axes (decimal separerator,
etc.) when switching between languages with style = english
(default style is Dutch). See also parameter(s): style.
axis_barplot_col:
colour of extra axis in
barplot. The value is of type ‘string’. For the
default style the value is black. See also
parameter(s): axis_barplot_lwd.
axis_barplot_lwd:
line width of axis at y = 0 in
case of barplot. The value is of type
‘numeric’. For the default style the value is 1.
See also parameter(s): axis_barplot_col.
big_mark:
big mark is put beween every 3 decimals
before the decimal separator. The value is of type ‘string’. Example(s): . or ,.
For the default style the value is .. For the
english style the value is ,.
decimal_mark:
decimal separator. The value is of
type ‘string’. Example(s): . or ,.
For the default style the value is ,. For the
english style the value is ..
force_y_at:
normally James adds whitespace around
the graph (see parameter empty_fraction_plot). You can force James to
put the gridlines at precisely y_at (value: y). Otherwise (value: n)
James will add extra gridlines if necessary. The value is of type ‘bool’. For the default style the
value is n.
x_axis_bold_col:
color of x-axis. The value is of
type ‘string’. For the default style
the value is black. See also parameter(s): x_axis_bold_if_zero.
x_axis_bold_if_zero:
switch off the horizontal
bold line if you don’t want it. The value is of type ‘bool’. For the default style the
value is y. For the heatmap style the value is
n. See also parameter(s): x_axis_show.
x_axis_bold_lwd:
line width of x-axis. The value
is of type ‘numeric’. For the default
style the value is 1. See also parameter(s): x_axis_bold_if_zero.
x_axis_show:
show the x-axis. Set n
if you want to hide x_lab and x_ticks. The grid lines (parameter y_at)
are shown independently of the axis. The value is of type ‘bool’. For the default style the
value is y. See also parameter(s): x_lab, x_ticks, y_axis_show, y_at. Figure(s) using ‘x_axis_show’:
Six different line types,
trend-vs-niveau.
x_lab: the
labels you want at the positions x_at. The value is a list with elements of the type ‘string’ separated by ‘;;’. See also
parameter(s): x_at, x_ticks, x_lab_bold, x_lab_italic.
x_lab_as_text:
if ‘y’, values at the x-axis are
seen as text instead of numbers. This enables you to show equidistant
bars above unequally spaced x-values (years 2000, 2009, 2010). The value
is of type ‘bool’. Figure(s) using
‘x_lab_as_text’: Number of phones in the
world, Number of phones in the world,
Tozo.
x_lab_big_mark_show:
for the values at the
x-axis, use y if you want a character between every three
digits left of the decimal separator. The value is of type ‘bool’. For the default style the
value is n. Figure(s) using ‘x_lab_big_mark_show’:
Decompositie gemiddelde marginale belastingdruk
werknemers 2021 , Toeslagen.
x_lab_bold:
makes the i’th label bold. You can
combine bold with italic. The value is a list
with elements of the type ‘numeric’ separated
by ‘,’. Unit: ‘index’. See also parameter(s): x_lab, x_lab_italic, y_lab_italic. Figure(s) using
‘x_lab_bold’: {x,y}lab{bold,italic}.
x_lab_col:
not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is black. Figure(s) using
‘x_lab_col’: Impact no-deal Brexit
(horizontal), Impact no-deal
Brexit (tall).
x_lab_date_show:
if y, dates are
shown instead of numbers (n). The value is of type ‘bool’. See also parameter(s): x_date_format. Figure(s) using
‘x_lab_date_show’: Economische groei in
Nederland, No auto-scaling,
The use of y_r_lim.
x_lab_font_size:
relative font size of the labels
on the x-axis. The value is of type ‘numeric’.
For the default style the value is 1. Figure(s)
using ‘x_lab_font_size’: Investeringen in
Nederland¹ door de zwaarst- getroffen eurolanden in 2018 en vice
versa.
x_lab_italic:
makes the i’th label italic. The
value is a list with elements of the type ‘numeric’ separated by ‘,’. Unit: ‘index’.
See also parameter(s): x_lab, x_lab_bold, y_lab_bold. Figure(s) using
‘x_lab_italic’:
{x,y}lab{bold,italic}.
x_lab_rotation:
rotate the labels at the x-axis.
Zero (0) for horizontal. 90 for vertical. The value is of type ‘numeric’. Unit: ‘degrees’. Example(s):
0, 45, 90. For the default style the value is
0. Figure(s) using ‘x_lab_rotation’:
Impact no-deal Brexit (horizontal).
x_lab_v_shift:
downshift of the labels at the
x-axis. The value is of type ‘numeric’. Unit:
‘cm’. For the default style the value is 0.15.
x_lim:
restrict the range of the x-axis to this
limit. The value is a list with elements of the
type ‘numeric’ separated by ‘,’. Example(s):
0, 100. See also parameter(s): y_lim, x_keep, x_lim_follow_data. Figure(s)
using ‘x_lim’: Ontwikkeling EMU-schuld in
schokscenario’s, Oversterfte in 2020,
Rentespreads op overheidsschuld,
Overlapping labels (NL, PT),
Different alignment for
PT, Groeibijdragen bestedingen,
Two series of whiskers in one plot.
x_lim_follow_data:
if you don’t care about nice
labels on the left and right side of the x-axis but if you want to zoom
in to your data as much as possible, you can set this parameter to ‘y’.
The value is of type ‘bool’. For the
default style the value is n. See also
parameter(s): x_lim, x_keep. Figure(s) using
‘x_lim_follow_data’: Six different line types,
Industriële productie en
detailhandel, NL’ers hebben buitenlandse
obligaties, Geraamd vanaf
1958, Werkverliezers,
Groeibijdragen bestedingen.
x_n_decimals:
number of digits right of decimal
separator on x-axis. If you don’t provide a number, the number of digits
will be automatically determined based on the values on the axis. The
larger interval the values these span, the less digits shown. The value
is of type ‘numeric’. Example(s):
1, 2.
x_ticks:
overrule the default ticks at the
x-axis. Leave empty for default (x_at). NB this parameter is used only
if x_ticks_date is not given. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
1990, 1995, 1997, 2000. See also parameter(s): x_ticks_date, x_ticks_lwd, x_ticks_length, x_ticks_col, x_ticks_vshift. Figure(s) using
‘x_ticks’: VWO,
Impact no-deal Brexit (horizontal),
Impact no-deal Brexit (tall).
x_ticks_col:
not documented yet. The value is of
type ‘string’. For the default style
the value is black.
x_ticks_date:
choose one or two if you want ticks
at these places. Beware, the default ticks will not be shown now (set
x_ticks_show = y if you want them too). The value is a list with elements of the type ‘string’ separated by ‘,’. Unit: ‘unit of
time’. Example(s): years, quarters, months, weeks, days.
See also parameter(s): x_ticks.
Figure(s) using ‘x_ticks_date’:
Groeibijdragen bestedingen,
Economische groei in Nederland,
No auto-scaling,
The use of y_r_lim,
Tozo-uitkeringen per maand.
x_ticks_length:
not documented yet. The value is
of type ‘numeric’. Example(s):
-1.4999999999999999E-2. For the default style the
value is -2.5000000000000001E-2. For the no-legend
style the value is -0.02.
x_ticks_length_date:
not documented yet. The
value is of type ‘numeric’. For the
default style the value is -0.03.
x_ticks_lwd:
not documented yet. The value is of
type ‘numeric’. For the default style
the value is 0.25. For the heatmap style the value
is 0.
x_ticks_vshift:
vertical shift of the x-axis.
Positive means shift downwards. The value is of type ‘numeric’. Unit: ‘line’. Example(s):
-0.5. For the default style the value is
0.
x_top_lab_col:
not documented yet. The value is
of type ‘string’. For the default
style the value is black.
y_at:
position at which you want labels and
gridlines at the y-axis. The value is a list
with elements of the type ‘numeric’ separated
by ‘,’. Example(s): 0, 20, 40, 60, 80, 100. Figure(s) using
‘y_at’: ppower, Verlies van
banken na afschrijving 20% van de overheidsschuld van GIIPS-landen,
{x,y}lab{bold,italic},
Impact no-deal Brexit (horizontal).
y_axis_show:
use n if you want to
hide y_lab. Contrary to the x-axis, the y-axis does not have ticks. The
value is of type ‘bool’. For the
default style the value is y. See also
parameter(s): y_lab, x_axis_show. Figure(s) using
‘y_axis_show’: trend-vs-niveau.
y_force_include_zero:
expand y_lim so zero (y =
0, x-axis) is in range. Defaults to ‘n’. In case of stacked bars (bar=)
it defaults to ‘y’. The value is of type
‘bool’.
y_lab: the
text labels you want at the positions y_at at your left y-axis. Please
note that the number of values, which you specify for y_lab, should
match the number of values of y_at. If you don’t specify y_at yourself,
then you will depend on the number of values that is set for y_at by
James automatically. Please beware that the (number of) values for y_at
may change if you update your data set. So in general, the advice is to
manually set y_at too, if you choose to set y_lab manually. The value is
a list with elements of the type ‘string’ separated by ‘;;’. See also
parameter(s): y_lab_col, y_r_lab. Figure(s) using ‘y_lab’:
Six different line types,
Impact no-deal Brexit (horizontal),
Impact no-deal Brexit (tall).
y_lab_big_mark_show:
for the values at the
y-axis, use y if you want a character between every three
digits left of the decimal separator. The value is of type ‘bool’. For the default style the
value is y.
y_lab_bold:
makes the i’th label bold. You can
combine bold with italic. The value is a list
with elements of the type ‘numeric’ separated
by ‘,’. Unit: ‘index’. See also parameter(s): y_lab, x_lab_italic, y_lab_italic. Figure(s) using
‘y_lab_bold’: {x,y}lab{bold,italic}.
y_lab_col:
color of labels at left y-axis. The
value is a list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is black. See also
parameter(s): y_lab. Figure(s) using
‘y_lab_col’: Impact no-deal Brexit
(horizontal).
y_lab_font_size:
relative font size of the labels
on the y-axis. The value is of type ‘numeric’.
For the default style the value is 1.
y_lab_italic:
makes the i’th label italic. The
value is a list with elements of the type ‘numeric’ separated by ‘,’. Unit: ‘index’.
See also parameter(s): y_lab, x_lab_bold, y_lab_bold. Figure(s) using
‘y_lab_italic’:
{x,y}lab{bold,italic}.
y_n_decimals:
number of digits right of decimal
separator on y-axis. The value is of type
‘numeric’. Example(s): 1, 2. See also parameter(s): y_r_n_decimals, x_n_decimals.
By default, all time series are mapped to the left y-axis. If one
needs a secondary y-axis for one or more of the time series, one can use
parameter y_axis
(e.g. y_axis = l, l, r) to indicate which time
series should be projected on the secondary y-axis, respectively. The
following figure projects the first time series on the left y-axis and
the second time series on the right y-axis. James scales the right
y-axis in an automated fashion and provides nice ‘rounded’ values at the
gridlines.
|
|
Relevant parameters:
|
||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||
Please note that although parameter turn = y changes the
secondary y-axis to a horizontal ‘x’-axis, James will still
consider the axis as a secondary y-axis (and thus not as a secondary
x-axis).
| Parameter | Explanation |
|---|---|
y_r_scale_auto= y |
This is the default. James auto-scales the right y-axis |
y_r_scale_auto= n |
The right y-axis stretches exactly from the minimum to the maximum value in the corresponding data |
y_r_lim= 674, 800 |
This way you can set the min and max value at the right y-axis manually. |
y_r_scale_autoIn case of the default setting y_r_scale_auto= y,
James’ procedure to determine an adequate right y-axis is as follows.
James first determines the left y-axis as usual; i.e., equally
spaced ‘round’ values which cover the range of the values that are
projected on the left y-axis. This results in a certain number of
gridlines. This number of gridlines fixes the number of values James
wants on the right y-axis. Given this number, James determines equally
spaced ‘round’ values which cover the range of the values that are
projected on the right y-axis. Please note that because the number of
values on the right y-axis is fixed, the scaling may be suboptimal.
If you don’t want this automatic scaling, you can set
y_r_scale_auto = n. James will then use the minimum and
maximum value that is projected on the right y-axis and put those on the
lowest respectively highest gridline. The values inbetween are
interpolated.
|
|
Relevant parameters:
|
||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||||||
y_r_limIf you don’t like the minimum and maximum values, you can manually
change those values with parameter y_r_lim. The values inbetween
are interpolated.
|
|
Relevant parameters:
|
||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||||
The following parameters may be used for a secondary y-axis.
y_axis:
indicates for each of the respective time
series whether they are projected on the left (l) y-axis or on the right
(r) y-axis. If one or more series are on the right axis, style ‘y-right’
or ‘x-top’ (if ‘turn = y’) is automatically added as a style. The value
is a list with elements of the type ‘string’ separated by ‘,’. Example(s):
l, l, l, r, r. For the default style the value is
l. See also parameter(s): style, turn.
Figure(s) using ‘y_axis’: Verlies van banken na
afschrijving 20% van de overheidsschuld van GIIPS-landen,
Economische groei in Nederland,
No auto-scaling,
The use of y_r_lim.
y_r_at: the
numbers you want at the right y-axis at the gridlines. Please note that
the numbers should be equidistant. Please leave empty to let James find
proper values. The value is a list with
elements of the type ‘numeric’ separated by
‘,’. Example(s): 1.0, 1.5, 3.0. See also parameter(s): y_r_lab, y_r_lab_col, y_r_n_decimals.
y_r_lab:
the text labels you want at the
positions y_at at your left y-axis. The value is a list with elements of the type ‘string’ separated by ‘;;’. See also
parameter(s): y_r_at, y_lab, y_r_lab_col. Figure(s) using
‘y_r_lab’: Six different line types,
Impact no-deal Brexit (horizontal),
Impact no-deal Brexit (tall).
y_r_lab_col:
not documented yet. The value is a
list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is black. Figure(s) using
‘y_r_lab_col’: Impact no-deal
Brexit (tall).
y_r_lim:
set limit of right y-axis (see y_lim).
Please note that, based on the given y_r_lim range, James tries to find
‘nice values’ for the right y-axis, where the number of values equals
the number of gridlines as given by the left y-axis. The value is a list with elements of the type ‘numeric’ separated by ‘,’. See also
parameter(s): y_lim, y_r_n_decimals. Figure(s) using
‘y_r_lim’: The use of y_r_lim.
y_r_n_decimals:
number of digits right of decimal
separator on right y-axis. The value is of type
‘numeric’. Example(s): 1, 2. See also parameter(s): y_n_decimals, x_n_decimals. Figure(s) using
‘y_r_n_decimals’: No
auto-scaling.
y_r_scale_auto:
lets James find scale the right
y-axis so that (i) the number of values on the right y-axis is equal to
the number of gridlines as set by the left y-axis, and (ii) the values
on the right y-axis are ‘pretty’. The value is of type ‘bool’. For the default style the
value is y. See also parameter(s): y_r_n_decimals. Figure(s) using
‘y_r_scale_auto’: No
auto-scaling.
By exception it may happen however, that one only wants to map a
fraction of the figure on the secondary y-axis. The following figure
illustrates how to do so for a particular case where the impact of a
no-deal Brexit is shown per country. The impact of one of the countries
is shown at the secondary y-axis. Please note that the data of this
single country was scaled by hand (i.e. divided by five) and
that the labels at the secondary y-axis were placed by hand too. Because
turn = y, the secondary y-axis becomes the x-axis at the
top of the figure.
|
|
Relevant parameters:
|
||||||||||||||||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||||||||||||||||||||||
The following figure shows the exact same data, without swapping the
x- and y-axis (i.e. turn = n). This keeps the
countries on the x-axis.
|
|
Relevant parameters:
|
||||||||||||||||||||||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||||||||||||||||||||||||||||
If you don’t want a legend, you can set legend_show = no
or style = no-legend. In both cases the legend dissapears,
however, in the first case the x-axis stays at the same position, while
in the second case the plotting area is extended into the now empty
legend space.
Setting parameter ‘legend_math = yes’ enables the use of mathematical expressions. This page shows examples of basic mathematical expressions. The following figure shows an example of the use of such expressions in James.
|
|
Relevant parameters:
|
||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||
The following parameters may help to tweak your legend (e.g. number of items per column).
legend_column_space:
space between columns in
legend. The value is of type ‘numeric’. Unit:
‘cm’. For the default style the value is 0.375.
legend_font_style:
1 = normal, 2 = bold, 3 =
italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s):
1, 2, 3, 4. For the default style the value is
3.
legend_forecast_show:
added shaded block with
dashed line to legend if forecast_x is set. The value is of type ‘bool’. For the default style the
value is y. See also parameter(s): forecast_x.
legend_forecast_text:
forecast in right language.
The value is of type ‘string’. For the
default style the value is start raming. For the
english style the value is prognosis.
legend_line_distance:
space between lines in
legend. The value is of type ‘numeric’. Unit:
‘cm’. For the default style the value is 0.315.
legend_math:
enables the use of Greek characters
(e.g. mu, sigma), subscript (e.g. f[x]) and superscript (e.g. ^2) in
time series names. Please beware: use a tilde (~) to indicate a
whitespace. The value is of type ‘bool’.
Example(s): a^2, mu, y[x]. For the default style
the value is n. Figure(s) using ‘legend_math’:
Mathematical expression in legend.
legend_n_per_column:
number of time series names
per column in legend. The value is of type
‘numeric’. Example(s): 1, 4. For the default style
the value is 3. For the fan style the value is
4. For the ppower style the value is
4. Figure(s) using ‘legend_n_per_column’:
Investeringen in Nederland¹ door de zwaarst-
getroffen eurolanden in 2018 en vice versa,
Impact no-deal Brexit (horizontal),
VMBO,
Verwacht verlies in verschillende
scenario’s, Mathematical
expression in legend.
legend_order:
use this to shuffle order or make
selection (example shows only series 1, 3 and 5). The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
1, 3, 5. Figure(s) using ‘legend_order’:
Partly dashed line,
NL’ers hebben buitenlandse obligaties,
Cohorten omvatten veel asielmigranten,
Participatie gemeenten,
Two series of whiskers in one plot.
legend_show:
put at n if you don’t
want a legend. Doing so will keep the rest of the figure unchanged. If
you want to make use of the space that emerges from hiding the legend,
you can set ‘style = no-legend’. The value is of type ‘bool’. For the default style the
value is y. For the no-legend style the value is
n. See also parameter(s): style.
legend_space_symbol_txt:
space between symbol and
text. The value is of type ‘numeric’. Unit:
‘cm’. For the default style the value is 0.15.
legend_symbol_height:
not documented yet. The
value is of type ‘numeric’. Unit: ‘fraction of
legend_line_distance’. For the default style the
value is 0.8. See also parameter(s): legend_line_distance.
legend_symbol_width:
width of symbol in legend.
The value is of type ‘numeric’. Unit: ‘cm’. For
the default style the value is 0.3.
legend_x:
position of left side of legend. The
value is of type ‘numeric’. Unit: ‘cm’.
Example(s): 0.03. For the default style the value
is 0.45.
legend_y:
position of top of legend, seen from
bottom of figure. The value is of type
‘numeric’. Unit: ‘cm’. Example(s): 0.12. For the
default style the value is 1.3. For the
map style the value is 1.08. Figure(s) using
‘legend_y’: VWO,
Investeringen in Nederland¹ door de zwaarst-
getroffen eurolanden in 2018 en vice versa,
Impact no-deal Brexit (horizontal).
name: names
of the individual time series. These overwrite the series names in the
headers of the data sheet and thus also in the legend. Beware: use ;; as
separator between names. The value is a list
with elements of the type ‘string’ separated by
‘;;’. Example(s): bbp;; inflation;; interest. Figure(s)
using ‘name’: Arbeidsmarktregio’s in 2020
volgens CBS, Participatie
gemeenten.
James makes it easy to color your time series by putting nice
combinations of colors in a so-called palette. You set the palette with
parameter palette. The
default is palette = auto. Please note, auto
is not a palette. auto will be replaced by either
cpb_3 if there are less than four time series or by
cpb if there are more time series. An alternative is
palette = kansrijk so that the kansrijk colors
are used (see below for its colors). Might you run out of colors in one
palette, you can easily join different palettes, e.g. by
palette = cpb, appletv, which concatenates these two
palettes. Subsection Customization of colors and
palettes shows an example that customizes colors. Subsection Parameters to tweak your
colors describes the use of palette in more detail.
Below you’ll find the appletv and other carefully composed
palettes.
If you start James in R, you can get the exact hex
triplet for the cpb palet as follows.
get_pal("cpb")
## endeavour anakiwa rose mauvelous brown cold_turkey siren biscay dorado
## 1 #005faf #87d2ff #e6006e #F596AF #96827d #d7c8c8 #820050 #193c69 #64504b
If you deal with less than four time series:
get_pal("cpb_3")
## endeavour rose brown
## 1 #005faf #e6006e #96827d
yarrr pacakge. Kudos for the yarrr package!
James gives each color a name. You can admire a specific palette and get the names of its colors as follows in R.
show_col_pals("cpb", TRUE)
Fan charts are a special case of the bandwidth plots. If style is set to
fan, James will use the below fan palette.
The use of a color palette makes it straighforward to customize the
colors in your figure. You can manually set parameter palette to a combination of
palettes and separate colors as defined above. The figure below combines
three separate colors (red, blue, white) with a palette (appletv).
|
|
Relevant parameters:
|
||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||
James evaluates colors in a recursive manner. Meaning, if the color itself is a parameter (e.g. ‘cpb’ or ‘kansrijk’), James will replace it with its parameter value. The values will be evaluated in turn. If a value is a parameter that refers directly to a color (e.g. ‘sun’ = #fbad1d), then it eventually will be replaced by its hex triplet. So, you can combine palettes, color names and hex triplets in any order when defining a palette. You can make a color transparent by appending two hexadecimal numbers to the hex triplet (e.g. #ff0000 is red, and #ff000088 is semi-transparent red). These two numbers indicate the degree of opacity (i.e. 00 means fully transparent, ff means fully opaque).
For colors James uses the hex triplet coding. For example, red = #ff0000. You can use both color names for which a color is defined as hex triplets to indicate which colors you want to use.
bg_col:
background color in your figures. The
value is of type ‘string’. For the
default style the value is #eef8ff. For the
kansrijk style the value is #ffffff.
col_order:
change color order. You may reuse
colors as is show in the example. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
3, 1, 1, 2, 2. Figure(s) using ‘col_order’:
Eerste indruk: corona treft ouderen
buitenproportioneel, Tweede
indruk coronadoden: relatief geen verschil 65-80 en 80+.
color: holds
the resulting colors in the same order as they are needed during the
plotting phase. If you don’t specify its values, the variable will be
automatically set during the pre-processing phase based on palette,
highlighting, etc. The value is a list with
elements of the type ‘string’ separated by ‘,’.
name_col:
this way you can assign specific colors
to specific time series, to ensure each series has one color in
different figures. The value is a list with
elements of the type ‘string’ separated by
‘;;’. Example(s):
bbp = blue;; inflation = yellow;; interest = pink.
Figure(s) using ‘name_col’: Groeibijdragen
bestedingen, Groeibijdragen
bestedingen, Groeibijdragen
bestedingen, Arbeidsmarktregio’s in 2020
volgens CBS.
|
| ||||||||
|
Relevant parameters: | ||||||||
| ||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. |
For official figures, you may want to add a logo on top. Parameter logo= y does so.
Text next to the logo is by default Centraal Planbureau and if
style = english then the text is CPB Netherlands Bureau
forPolicy Analysis.
|
|
Relevant parameters:
|
||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||
logo: shows
CPB-logo above figure. The value is of type
‘bool’. For the default style the value is n.
Figure(s) using ‘logo’: Forecasted
from 1958, Geraamd vanaf
1958, Violent crime rates in the USA.
logo_file:
file that holds your logo. The value
is of type ‘path’. For the default
style the value is ext/img/rijkslogo.png.
logo_height:
height logo should have in the
figure. Width is auto-scaled. The value is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 1.
logo_text_en:
english text next to logo. The
value is of type ‘string’. For the
default style the value is
CPB Netherlands Bureau for\nEconomic Policy Analysis.
logo_text_nl:
dutch text next to logo. The value
is of type ‘string’. For the default
style the value is Centraal Planbureau.
You can use style = english if you want numbers to have
a dot (.) as decimal separator and a comma (,) for thousands separator.
If you use the cpb logo (logo_show = y, explained
elsewhere), this style will make sure that the text next to the logo is
in English too.
This style entails the following settings; please note that a comma
(‘,’) separates the items here (this may be a little confusing).
decimal_mark: ., big_mark: ,,
legend_forecast_text: prognosis,
forecast_text: prognosis
This style combines with other styles always.
The figure below is an example how you can add a text label if your x-axis is of type ‘date’. Please see Section ‘Axes’ for details on dates on axes.
|
|
Relevant parameters:
|
||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||
If your x-axis comprises dates, you should use
text_x_date instead of text_x as in the
following figure. Please see the subsection on parameters for
datails.
|
|
Relevant parameters:
|
||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||
text_col:
the color of the label. The value is a
list with elements of the type ‘string’ separated by ‘,’. Example(s):
black, rose, green. For the default style the
value is black. Figure(s) using ‘text_col’:
Oversterfte in 2020,
Industriële productie en
detailhandel, Impact no-deal Brexit
(horizontal), Impact no-deal
Brexit (tall).
text_font_size:
relative font size. The value is
a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
0.7, 1.5. For the default style the value is
1. Figure(s) using ‘text_font_size’:
Industriële productie en
detailhandel.
text_font_style:
1 = normal, 2 = bold, 3 =
italic, 4 = bold and italic. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
1, 2, 3, 4. For the default style the value is
3. Figure(s) using ‘text_font_style’:
Older workers more productive?.
text_label:
the text label you want to show in
the figure. The value is a list with elements
of the type ‘string’ separated by ‘;;’.
Example(s): first label;; second label. Figure(s) using
‘text_label’: Oversterfte in 2020,
Industriële productie en
detailhandel, Older workers more
productive?, Rentespreads op
overheidsschuld, Impact no-deal
Brexit (horizontal), Impact
no-deal Brexit (tall).
text_offset:
distance (‘offset’) of the text
label from the specified coordinate in fractions of the width of the
letter ‘m’. The value is a list with elements
of the type ‘numeric’ separated by ‘,’. For the
default style the value is 0.5. Figure(s) using
‘text_offset’: Different
alignment for PT.
text_pos:
alignment of your text label. Leave
empty if you want your text centerd on the given (x,y) coordinates. Or:
1 = below, 2 = left, 3 = above, 4 = right. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
1, 2, 3, 4. Figure(s) using ‘text_pos’:
Oversterfte in 2020,
Older workers more productive?,
Rentespreads op overheidsschuld.
text_rotation:
the rotation of the label in
degrees counterclockwise. Zero (0) means horizontal, 90 means vertical.
The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
0, 45, 90. For the default style the value is
0. Figure(s) using ‘text_rotation’:
Industriële productie en
detailhandel, Impact no-deal Brexit
(horizontal).
text_x: the
x-position of your text label. If your x-axis is numeric, just put the
value here. If you use bars, then text_x works as follows. The x-value
of the first x-position is 1, i.e. where the first (set of)
bars are located. The second is 2, etc. So, if you want your label
inbetween the first two x-position, you should use 1.5 as a value. If
your x-axis holds dates, please use text_x_date instead. The value is a
list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using
‘text_x’: Oversterfte in 2020,
Industriële productie en
detailhandel, Older workers more
productive?, Impact no-deal Brexit
(horizontal), Impact no-deal
Brexit (tall).
text_x_date:
if your x-axis consists of dates,
you should use this parameter instead of text_x, to indicate what the
x-postion of your text label is. Please mark the cell in Excel as a
‘date’ (i.e. not as a regular number). The value is a list with elements of the type ‘Date’ separated by ‘,’. Example(s):
2020-03-18. Figure(s) using ‘text_x_date’:
Rentespreads op overheidsschuld.
text_y: the
y-postion of your text label. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using
‘text_y’: Oversterfte in 2020,
Industriële productie en
detailhandel, Older workers more
productive?, Rentespreads op
overheidsschuld, Impact no-deal
Brexit (horizontal), Impact
no-deal Brexit (tall).
This section explains how you can add many text labels to your figure, in an easy way. If you want to add many text labels you can go one step further and treat them as a ‘time series’.
TODO HIER ANDERE VARS TOEVOEGEN VOOR MEER CONTROLE
label_font_size:
relative to font size of title.
The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the
default style the value is 1. Figure(s) using
‘label_font_size’: Overlapping labels
(NL, PT), Different
alignment for PT.
label_series_n:
the number of the time series
that you want to label. The value is of type
‘numeric’. For the default style the value is 1.
The following figure illustrates how one can create a parameter from
one of the columns in the data tab. With Parameter label_series_n you can
set which time series you want to label. It has a default value of 1,
which is the first time series and thus the series we want to label, so
there is no need to set it here. Parameter label_align determines
the positions of the labels in the figure. The default aligment is
label_align = 4, meaning ‘to the right of the given
position’. As you can see, the labels PT and NL overlap in the following
figure.
|
|
Relevant parameters:
|
||||||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||||||||||||
The following figure fixes the overlap by adding parameter label_align to the data
tab and sets a specific value of 1 (meaning: align below) to label PT.
In addition the space between the labels and the dots is reduced with
text_offset = 0.25.
|
|
Relevant parameters:
|
||||||||||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||||||||||||||||||
Section ‘The data tabs’ explains in more detail how and when to use the data tab to set or create parameters that can be used in the plotting.
James offers several ways to add help lines and shading to a plot.
Parameter x_shading
shades part of your figure before the plotting starts,
parameter shading_suppress_x
applies the shading after the plotting takes place. Therefore,
shading_suppress_x enables you to ‘mask’ part of your plot.
The first figure demonstrates the use of
shading_suppress_x, c.q.
shading_suppress_x_date.
FIGURE REMOVED (reason: CBS changed interface)
The second figure demonstrates the use of x_shading,
c.q. x_shading_date.
FIGURE REMOVED (reason: CBS changed interface)
grid_lines_col:
not documented yet. The value is
of type ‘string’. For the default
style the value is black.
grid_lines_lwd:
line width. The value is of type ‘numeric’. For the default style the
value is 0.25. Figure(s) using ‘grid_lines_lwd’:
Mathematical expression in legend.
hline_bold:
by default the lowest gridline is
bold. Except if your plot contains bars and zero is visible, then the
default is zero. If you want the bold line(s) to appear at other places,
you can specify the(ir) y-value(s) here. The value is of type ‘numeric’. For the ppower style the
value is 0. Figure(s) using ‘hline_bold’:
Hello World,
Bbp tijdens crises,
Partly dashed line,
Oversterfte in 2020,
VWO,
VWO,
trend-vs-niveau.
hline_bold_col:
line color. The value is of type ‘string’. For the default style the
value is black.
hline_dash:
not documented yet. The value is of
type ‘numeric’. Figure(s) using ‘hline_dash’:
Kans om in risicogroep te zitten,
Tweede indruk coronadoden:
relatief geen verschil 65-80 en 80+,
Two series of whiskers in one plot.
hline_dash_col:
not documented yet. The value is
of type ‘string’. For the default
style the value is black.
hline_dash_lty:
not documented yet. The value is
of type ‘numeric’. For the default
style the value is 3.
hline_dash_lwd:
not documented yet. The value is
of type ‘numeric’. For the default
style the value is 1.
shading_suppress_col:
not documented yet. The
value is of type ‘string’. For the
default style the value is #ffffff88.
shading_suppress_x_date:
same as
shading_suppress_x, but then with dates instead of numbers. The value is
a list with elements of the type ‘string’ separated by ‘,’. See also
parameter(s): shading_suppress_x. Figure(s)
using ‘shading_suppress_x_date’: Eerste
indruk: corona treft ouderen buitenproportioneel.
vline_dash:
not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using
‘vline_dash’: Oversterfte in 2020,
Impact no-deal Brexit (horizontal),
Impact no-deal Brexit (tall).
vline_dash_col:
not documented yet. The value is
of type ‘string’. For the default
style the value is black. Figure(s) using ‘vline_dash_col’:
Oversterfte in 2020.
vline_dash_date:
not documented yet. The value is
a list with elements of the type ‘string’ separated by ‘,’. Example(s):
2020-12-31. Figure(s) using ‘vline_dash_date’:
Eerste indruk: corona treft ouderen
buitenproportioneel, Rentespreads op
overheidsschuld.
vline_dash_lty:
not documented yet. The value is
of type ‘numeric’. For the default
style the value is 3.
vline_dash_lwd:
not documented yet. The value is
of type ‘numeric’. For the default
style the value is 1.
x_shading:
vertical shading (from, to, from, to,
etc.). The value is a list with elements of the
type ‘numeric’ separated by ‘,’. Example(s):
2000, 2005, 2010, 2015. See also parameter(s): shading_suppress_x.
x_shading_col:
not documented yet. The value is a
list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is #00000022. Figure(s)
using ‘x_shading_col’: Tweede
indruk coronadoden: relatief geen verschil 65-80 en 80+.
x_shading_date:
same as x_shading, but then with
dates instead of numbers. The value is a list
with elements of the type ‘string’ separated by
‘,’. See also parameter(s): x_shading. Figure(s) using
‘x_shading_date’: Tweede indruk
coronadoden: relatief geen verschil 65-80 en 80+,
Tozo-uitkeringen per maand.
With parameters rect_xleft, rect_ybottom, rect_xright, rect_ytop you can specify
the sides of the rectangle you want to add. You can color the interior
of the rectangle with parameter rect_col and its border with
rect_border. You don’t
have to color both, i.e. you can choose to color only the
interior or the border. Please see this
figure for an example.
This section explains how to (i) manipulate or preprocess (e.g. scale) data before plotting it, (ii) how to add a formula/function, (iii) add data from CBS using only a url, and (iv) ultimately add your own R code to make any plot you want in the given CPB-style.
You are free to use functions and algebra in your xlsx-file. James
will use the result of that. So, if you would put = 1 + 1
in a cell, Excel will show you the anser (2), which will be
used by James, too.
Next, there are several ways (c.q. parameters) to manipulate your data after you save them in your xlsx-file but before you create the figure:
Data operations, executed in the order: order(_name), scale, keep, transformation.
order:
select subset of time series you want to
plot. You can also change the order (see example). Please note: the
ordering is the very first action (before scaling). It’s the same as
re-ordering the columns in your data tab, yourself. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
1, 4, 2. Figure(s) using ‘order’:
Number of phones US vs. Europe,
Eerste indruk: corona treft ouderen
buitenproportioneel, Tweede
indruk coronadoden: relatief geen verschil 65-80 en 80+,
Bestaande koopwoningen,
Violent crime rates in the USA.
scale: scale
your data. You may use this for example to scale fractions to
percentages (scale = 100). The value is a list
with elements of the type ‘numeric’ separated
by ‘,’. Example(s): 100. For the default style the
value is 1. For the ppower style the value is
100. Figure(s) using ‘scale’:
NL’ers hebben buitenlandse obligaties,
kansrijk,
Tweede indruk coronadoden:
relatief geen verschil 65-80 en 80+, Verlies
van banken na afschrijving 20% van de overheidsschuld van
GIIPS-landen.
transformation:
this transformation function will
be applied to each y-value individually. The value is of type ‘string’. Example(s):
log, function(x) x^2. Figure(s) using ‘transformation’:
Werkverliezers.
x_scale:
scales the x-axis. The value is of type ‘numeric’. Example(s):
0.001, 100. For the default style the value is
1. For the ppower style the value is
1E-3. Figure(s) using ‘x_scale’:
Decompositie gemiddelde marginale belastingdruk
werknemers 2021 .
Please beware of the order in which the data manipulations are performed.
The first step and most straightforward one is order,
which you can use to re-order your columns before anything else happens.
For example, if you would have a data set with only two time series,
order = 2, 1 will have the same effect as swapping the
corresponding two columns in the xlsx-file.
The second step uses parameters x_raw_keep and y_raw_keep to indicate
which raw data you want to keep and discard. The advantage of removing
data early in the process (here: before scaling), may save computational
time and thereby speed-up the process.
The second step in the data manipulation phase is the scaling of your
data. For example, scale = 100 may be used to convert
fractions into percentages. If you supply only one value here, that
value will be applied to each series. However, you may also choose to
scale different series with different values. For example, if you have
two time series and scale = 100, 1, the first one will be
multiplied by 100.
Third step: similarly to scaling your y-values, with
x_scale you can scale the values on your x-axis. Please see
this figure for an example.
The fourth step uses parameters x_keep and y_keep to indicate which data
you want to keep after the scaling has taken place. Data outside these
ranges is discarded.
The fifth and last step in the data manipulation phase is a
transformation with custom R-code. You can put your own custom
transformation function there, but you can also use R’s
built-in-functions such as log in the next figure. Please
note that data are first scaled and then transformed.
|
|
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||
The parameter x_lim_follow_data = y (see x_lim_follow_data)
makes the x-axis zoom-in to the max so you don’t have white spaces left
and right. This parameter will be discussed in more detail in the
section about axes.
There are two ways to visualize the function of a given formula.
First, you can use formula’s in Excel (see Section ‘Data manipulation’ for details). Second,
with the parameter formula.
The following figure adds the sinus of the x-values in the
example from Section ‘A kick-start
example’, multiplied by ten. Please note that the first column in
the data parmeter (i.e. p$data[, 1]),
holds the x-values. The following column in the
data parameter (i.e. p$data[, 2])
holds the first time series (here: (6 - x)^2), the third
column (i.e. p$data[, 3]) holds the second time
series, and so on.
|
|
Relevant parameters:
|
||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||||
formula:
append outcome of formula after last
column to data. Please note, your data x-values are in p$data[, 1]. The
first series’ values are in p$data[, 2], the second in p$data[, 3] and
so on. So, the example determines the mean of the first and second
series. The value is of type ‘string’.
Example(s): rowMeans(p$data[, 2:3]). Figure(s) using
‘formula’: Hello World.
formula_name:
legend name of formula. The value
is of type ‘string’. Example(s):
sinus. Figure(s) using ‘formula_name’:
Hello World.
Obviously, James can’t just make any figure you can think of. If you
want to go beyond James’ current limits, you may consider to start with
a basic figure - so you get the CPB-style for free - and enrich that
with custom R-code. The following figure, for example, adds differently
sized symbols and a custom legend to the figure. Please beware, the
current version of the manual does not correctly show the value of
parameter custom here; the $-sign is interpreted wrongly
here. As a workaround, please download the xlsx-file via the link below
the figure if you want to scrutinize this example in detail.
|
| ||||||||||||||||||||||||||
|
Relevant parameters: | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. |
Custom R-code that will be run after James finishes the rest of the plotting.
custom:
your parameters are available as
p$parameter. You have acces to your data as follows. The x-values are in
p$data[, 1]. The first time series is p$data[, 2], the second is
p$data[, 3], etc. If you generate figures from R (i.e. not
Excel), you may define a function ‘custom <- function(p) { … }’ with
a custom implementation instead. The value is of type ‘string’. Example(s):
lines(p$data[, 1], mean(p$data[, 2:3])). Figure(s) using
‘custom’: Eerste indruk: corona treft ouderen
buitenproportioneel, Tweede
indruk coronadoden: relatief geen verschil 65-80 en 80+,
Older workers more productive?.
In some cases, James can plot data straight from a cbs url. Don’t use the url in the url-bar for that, but click on the ‘export’ or ‘share’ button to find the data url, which you can feed to James.
In this case, the author has constructed a table with sold house prices in The Netherlands and in ’s-Gravenhage, a municipality.
|
This way, your figure is always up-to-date at the moment you create it. |
Relevant parameters:
|
||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||
This functionality is under development. It may thus be that it does not work exactly as expected. Please contact the author if you don’t succeed.
If you refer both to a CBS-url and to a data tab, James will combine the two data sets. For example:
|
|
Relevant parameters:
|
||||||||||||||
| How to reproduce this figure: copy this xlsx-file and james-l02p-2024-10-10.bat (starts on Windows, runs on Linux), james-windows-2024-10-10.bat (starts on Windows, runs on Windows), or james-2024-10-10.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R. | |||||||||||||||
James puts your own data set first. To make this figure best
comparable to the previous, we’ve changed the order of the time series
with parameter order = 2, 3, 1 so the added bbp series
comes third. More about the parameter order in Section ‘Data manipulation’.
In this case, the added data (‘\(\Delta\)bbp (%)’) has a different unit and should be shown on another y-axis. The section on how to customize your axes explains in detail how to do so.
This section provides more details on the input files, the output files and the steps in between (chained in pipelines). It discusses the structure of the xlsx-file. It also explains the details you need if you start creating your own xlsx files from scratch.
Parameter file sets the base of the file name of your
figure(s). The base is the part before the suffix (extension). If you
don’t set file, James will set a default file name that is
based on respectively id, title, or
tab name, whichever is set by you. If nothing is set,
james-figure will be set as base.
Fonts, the use of different character scripts, special characters and
white spaces in file names are a potential source of errors. Therefore,
any punctuations, special characters and white spaces in the file name
are automatically removed and replaced with a dash (-).
Please note that, for the sake of consistency, this includes underscores
(_). You may prevent these corrections of the the file name
by setting parameter file_correct_name= n.
In any case, as a last step, the characters of your file name are
converted to the commonly used Latin-ASCII set of
characters.
file: base
file name of figure, id est, before the suffix .jpg, .pdf, .png or .svg
is added. The value is of type ‘string’.
Example(s): my-beautiful-figure. See also parameter(s): file_correct_name.
pdf_dir:
destination directory for your pdf’s.
Use / as separator. The value is of type
‘path’. For the default style the value is ..
time_stamp:
adds time-stamp to file name. The
value is of type ‘bool’. For the
default style the value is n.
You can just add the formats you want as boolean parameters to your
meta tab. By default png = y and other formats
are put to n by default.
Examples:
gif = y animates your figure (see next subsection for
details).jpg = y provides a jpeg file. This is a compressed
file, which may be used to save disk space. The image quality can be
controled by quality (default 75). NB This setting may
work but is not regularly checked and not supported.pdf = y
provides a vector graphics version of your figure (i.e.
‘infinite’ resolution), which may be used in LaTeX or pdf
documents.png = y (the
default) provides a so-called ‘portable network graphics’ version of
your figure. This setting is recommended because png’s
are not compressed (and are hence less blurry than jpg’s) and guarantee
that their layout (including font) is invariant between different
software programs that show them (e.g. Word, pdf, PowerPoint,
etc.).svg = y provides a scalable vector graphics version of
your figure, which may be used on e.g. websites. Svg is also
vector graphics but not displayed in each word processing program. NB
This setting may work but is not regularly checked and not
supported.So, we recommend using the default png
unless you have good reasons to use a different format.
Because there is a huge number of possible gifs one may want to make, we chose to automate this process only up to a certain degree.
If you set parameter gif = y, James will gifify your
figure. James will start by putting all your data at value zero. It will
then slowly ‘grow’ the data in gif_n_frames frames (default
20) to their actual values. You can set the delay between two frames
with paramter gif_delay (default 0.1 seconds).
Please note that the functionality to create gifs is not regularly checked. Please <contact the author> if you run into troubles while gifify’ing your figure :-)
This subsection shows an example of a custom gif. Please take a look at the following figure.
As you can see, the gif runs from scenario 1 to scenario 2. With this xlsx-file and this R-file you can reproduce this gif.
James only processes xlsx files that have a tab called
meta. Other files, i.e. .xls, .csv files,
or xlsx files that don’t have a meta tab, are ignored.
The meta tab defines your figures. The first column
contains the parameters (e.g. for a title). Each following
column defines a different figure with parameter values specific for
that figure. Each figure should refer to either a data tab (using the
parameter tab) or to a CBS-url. Two figures may share one
and the same data tab. If you want to make the exact same figure twice,
once in Dutch and once in English, you probably prefer to use one and
the same data sheet for both figures. In that case, you can distinguish
the two figures with the parameter id. Details:
tab: tab name
of the tab holding the data for the figure. One figure may refer to
multiple tabs, in which case the data will be joined. Multiple figures
may refer to the same tab to ‘get their data’, e.g. if you want
to make the same figure in different languages. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s):
name-of-tab-1, name-of-tab-2. Figure(s) using ‘tab’:
Hello World,
hello-world-bar,
Hello World,
Werkloosheid, Six
different line types, Bbp tijdens
crises, Partly dashed line,
Ontwikkeling EMU-schuld in schokscenario’s,
Number of phones US vs. Europe,
Spanning op arbeidsmarkt blijft
toenemen, Spanning op arbeidsmarkt
blijft toenemen, Spanning op arbeidsmarkt
blijft toenemen, Number of phones in
the world, Number of phones in the
world, Number of phones in the world,
Number of phones in the world,
Number of phones (Europe yellow),
Industriële productie en
detailhandel, NL’ers hebben buitenlandse
obligaties, Two bandwiths in one plot,
Oversterfte in 2020,
Cohorten omvatten veel asielmigranten,
Inflatie, Number of
phones in the world, Percentage bedrijven
dat TOZO gebruikt, Heatmap stressing low
and high values, Heatmap stressing low
values, Heatmap stressing high values,
Heatmap stressing middle values,
Inkomenseffecten plannen socialezekerheids- en
belastingstelsel, Kans om in risicogroep te
zitten, kansrijk,
Forecasted from 1958,
Geraamd vanaf 1958,
Werkverliezers,
Bestaande koopwoningen,
A discontinuity,
Europese steunpakketten,
Decompositie gemiddelde marginale belastingdruk
werknemers 2021 , VWO,
VWO,
VWO,
Tozo,
Investeringen in Nederland¹ door de zwaarst-
getroffen eurolanden in 2018 en vice versa,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
Standard normal distribution,
geo-first-example,
Arbeidsmarktregio’s in 2020 volgens CBS,
Participatie gemeenten,
World import, customs or balance of payments
(prices), change in july, 2020., World
trade volume change last month, World
trade volume change last month:, Phones
per continent, ppower,
Verlies van banken na afschrijving 20% van de
overheidsschuld van GIIPS-landen, Violent crime
rates in the USA, Coloring many series in a
clear and unique fashion is challenging,
Industriële productie en
detailhandel, Older workers more
productive?, Toeslagen,
Rentespreads op overheidsschuld,
Overlapping labels (NL, PT),
Different alignment for
PT, Groeibijdragen
bestedingen, Groeibijdragen
bestedingen, Groeibijdragen
bestedingen, Groeibijdragen
bestedingen,
{x,y}lab{bold,italic},
trend-vs-niveau,
Impact no-deal Brexit (horizontal),
Impact no-deal Brexit (tall),
VMBO,
Verwacht verlies in verschillende scenario’s,
Two series of whiskers in one plot,
Verwacht verlies in verschillende
scenario’s, Economische groei in
Nederland, No auto-scaling,
The use of y_r_lim,
Mathematical expression in legend,
Tozo-uitkeringen per maand.
id: unique
identifier that can be used for plotting in reports (plot(id), or
plot(“my-file.xlsx”, id = “nice-fig”)). In addition, it can be used to
distinguish two different figures in the same xlsx file, that share one
and the same data tab. The value is of type
‘string’.
A parameter in the meta tab has either a value or a list of values. A value can be of the following types:
bool: this means Boolean and should take value
y (full list: y, Y, yes, Yes, YES, T, TRUE) or
n (full list:
n, N, no, No, NO, F, FALSE).numeric: any numeric value. For single cell values, the
decimal separator depends on your Excel’s language settings. If you put
multiple values in a cell (e.g. separated by a comma or semicolon), then
you should use a dot (.) as decimal separator because the interpretation
is done by James in R.path: refers to a file or a path on diskstring: any consecutive sequence of letters, digits and
some special characters (e.g. -,
_)If a parameter is a list, then the values are separated by the list separator of the parameter. Different parameters may use different list separators. The list separators are: , / ; / ;; (separated by /). A reason to use not one but different list separators is this. Decimal numbers that are interpreted as a number by Excel should use the decimal separator that is set as such in Excel’s settings. Decimal numbers that are interpreted by James, such as sequences of numbers (e.g. 1.0, 2.73, 3.14), must use a point (.) as decimal separator. Decimal numbers may be separated in a simple manner by just a comma (e.g. 1, 2.0). Strings however may contain a comma, so they may be separated by a semicolon (e.g a, b; c). If, however, the string may contain a semicolon itself, a double semicolon may be used for that parameter (e.g. a, b; c;; d).
Why three different separators? That indeed isn’t stricly necessary. One could have chosen to use the double semicolon everywhere. That however would have been ugly and cumbersome. Therefore, James chooses to use a parameter dependent list separator. You can find the specific list separator a parameter uses in its definition in this manual. Each parameter also includes the type of its values.
To save time and effort, you may add a tab called
globals. Parameters defined in this tab are assigned to
each of the figures in the meta tab, unless overwritten
there.
There are two different ways to refer to a data set for your figure.
One of them is via the parameter tab in your meta
tab. The other way is to refer to a data set via a CBS link
(discussed in the next subsection). The value of the parameter
tab should equal the name of one or more
of the tabs in your xlsx file and hold your data. Such a ‘data tab’ can
have different forms. The most straightforward form is x-values
in the first column, and time series in the following columns. Each time
series should have a header (i.e. a name) defined in the first
row of the tab. Section ‘Text labels as
time series’ illustrates how to define a parameter in the data tab
so you can easily assign a different value for the parameter to each
x-value.
Based on the parameters, James creates the figures by executing a
pipeline of functions. The pipeline generally comprises
two steps. First data are pre-processed. This idea separates the work
that can be done before plotting takes place from the actual plotting
steps. Doing so may make debugging easier (set
[debug](#parameter_debug)``= y). You may
customize James by overriding one or more of the pre-processing and
plotting functions. In addion you can change the plotting order and
extend the pipeline with own custom functions.
First a series of pre-processing functions are executed. You can
easily add new functions (see parameter preprocess_order)
and/or override these functions: (1) add_style, (2)
preprocess_data_grouping_variables, (3)
validate, (4) draft, (5)
append_formula, (6) data_operations, (7)
preprocess_first, (8) replicate_params, (9)
forecast_pre, (10) label_pre, (11)
heatmap_pre, (12) area_stack_pre, (13)
hist_pre, (14) bars_pre, (15)
whisker_pre, (16) box_pre, (17)
linez_pre, (18) area_pre, (19)
color_pre, (20) legend_pre, (21)
set_lims, (22) set_labs, (23)
find_y_r_scaling, (24) logo_pre.
Next, the process functions are executed (see parameter plot_order): (1)
format_labs_set_margin_west, (2)
set_layout_and_init_plot, (3)
set_line_distance, (4) forecast_bg, (5)
shading, (6) rectangle, (7) axes,
(8) gridlines, (9) j_heatmap, (10)
area_stack, (11) area, (12) bars,
(13) extra_axis_barplot, (14) jbox, (15)
dot, (16) linez, (17)
linez_lsfit, (18) whisker, (19)
label, (20) shading_suppress, (21)
custom, (22) user_line, (23)
text_label, (24) forecast, (25)
margins_0000, (26) j_legend, (27)
titles, (28) footnote, (29)
logo.
If you want to further improve or extend James, you can update these
functions by overriding them in R or add novel functionlity in an R
script and adapting the preprocess_order and
plot_order lists accordingly.
This pipeline is used for geographic maps of The Netherlands.
plot_order_geo:
plot functions are called in this
order. You may overwrite a function if you want to customize it.
Alternatively, if you want to add your own custom plotting function to
James, please insert its name in this list. The value is a list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is
geo_init_plot, set_line_distance, geo_plot, margins_0000, j_legend, titles, footnote, logo.
preprocess_order_geo:
these functions are called
in this order before plotting. You may add a new function, by
extra_preprocessing(p), where both “james” == class(p) and “james” ==
class(extra_preprocessing(p)). The value is a list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is
geo_init, geo_validate, geo_pre, logo_pre.
This pipeline is used for geographic maps of the world.
plot_order_world:
plot functions are called in
this order. You may overwrite a function if you want to customize it.
Alternatively, if you want to add your own custom plotting function to
James, please insert its name in this list. The value is a list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is
world_map_init_plot, set_line_distance, world_map_plot, margins_0000, titles, world_map_title_www, footnote, logo.
preprocess_order_world:
these functions are
called in this order before plotting. You may add a new function, by
extra_preprocessing(p), where both “james” == class(p) and “james” ==
class(extra_preprocessing(p)). The value is a list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is
world_map_pre, world_map_projection, logo_pre.
James can put your figures in a report, which enables you to have a
quick overview and easily share them with colleagues. Next to your
figures, you can add a new column and set type = report
there. That’s all.
This report is what you get out-of-the-box if you run this xlsx-file (cf. ‘kMEV2021’ or ‘juniraming 2020’).
author: put
here the author if you don’t want to use the default. The value is of type ‘string’. Example(s): "r
whoami::fullname()".
caption:
caption if used in Markdown report. The
value is of type ‘string’. Example(s):
This text explains what you see In the figure.. Figure(s)
using ‘caption’: Bestaande
koopwoningen, A discontinuity.
date: what
you want as date. You may use the example if you want today’s date. The
value is of type ‘string’. Example(s):
"r format(Sys.Date())".
pandoc_location_windows:
not documented yet. The
value is of type ‘path’. For the
default style the value is
S:/Applicaties/CPB/pandoc.
pandoc_location_windows_bat:
not documented yet.
The value is of type ‘path’. For the
default style the value is
S:\Applicaties\CPB\pandoc.
report_default_data_show:
not documented yet. The
value is of type ‘bool’. For the
default style the value is n.
report_default_fig_show:
not documented yet. The
value is of type ‘bool’. For the
default style the value is y.
report_default_file:
not documented yet. The
value is of type ‘path’. For the
default style the value is
ext/snippet/james-report-default.Rmd.
report_default_param_show:
not documented yet.
The value is of type ‘bool’. For the
default style the value is n.
report_dir:
not documented yet. The value is of
type ‘path’. For the default style the
value is report.
report_james_appendix_path:
not documented yet.
The value is of type ‘path’. For the
default style the value is
ext/snippet/james-appendix.Rmd.
report_table_of_content:
not documented yet. The
value is of type ‘bool’. For the
default style the value is y.
report_text:
you can put your report (R-markdown)
text here directly. If you need more space, you can put your text in a
sheet and refer to that sheet with parameter tab. The last
option is to put your text in a separate file using parameter
report_text_file. The value is of type ‘string’. See also parameter(s): tab, report_text_file.
report_yaml_default:
not documented yet. The
value is of type ‘path’. For the
default style the value is
ext/snippet/yaml-default.Rmd.
report_yaml_html:
not documented yet. The value
is of type ‘path’. For the default
style the value is ext/snippet/yaml-html.Rmd.
report_yaml_ioslides:
not documented yet. The
value is of type ‘path’. For the
default style the value is
ext/snippet/yaml-ioslides.Rmd.
report_yaml_pdf:
not documented yet. The value is
of type ‘path’. For the default style
the value is ext/snippet/yaml-pdf.Rmd.
report_yaml_powerpoint:
not documented yet. The
value is of type ‘path’. For the
default style the value is
ext/snippet/yaml-powerpoint.Rmd.
report_yaml_toc:
not documented yet. The value is
of type ‘path’. For the default style
the value is ext/snippet/yaml-toc.Rmd.
report_yaml_word:
not documented yet. The value
is of type ‘path’. For the default
style the value is ext/snippet/yaml-word.Rmd.
Building the manual involves creating its figures too. Therefore, the building of the manual is a comprehensive test by itself.
The value of a James-parameter may depend on the style(s) you set.
You can find these parameter/style combinations in
M:/p_james/release/2024-10-10/ext/james-base-settings.xlsx
(available as a matrix in variable globals if you run the
R-code). You can overwrite a parameter value in both the
globals tab and the meta tab of your Excel
file.
Note to the developer: it requires some discipline to keep the
parameters in
M:/p_james/release/2024-10-10/ext/james-base-settings.xlsx
in sync with the parameters in the R-scripts. Parameters that are used
in the R-scripts but don’t exist in the settings file will result in an
error. So that’s easy. The other way around can however easily happen:
parameters that do existin the settings file but are not used (anymore)
in the scripts. The function
get_param_settings_not_in_any_R_file() can help to find
them. It lists parameters that are defined in the settings file, but
seem not used in any R-script nor code snippet in one of the following
ways.
get_param() functionPlease beware, the resulting list will indeed contain parameters you may want to remove from the settings file but will also in include colors and parameters that are used but not in one of these three ways. Please keep that in mind when considering to removing a parameter.
Please find
M:/p_james/release/2024-10-10/*/james-2024-10-10-manual.htmlM:/p_james/release/2024-10-10/M:/p_james/release/2024-10-10/examples/xlsx/ and
..R/
M:/p_james/release/2024-10-10/R/
M:/p_james/release/2024-10-10/ext/img/
M:/p_james/release/2024-10-10/ext/misc/
M:/p_james/release/2024-10-10/ext/report/
M:/p_james/release/2024-10-10/ext/snippet/
M:/p_james/release/2024-10-10/ext/style/
Oftentimes you will save multiple figures in one xlsx-file, while
working on only one. In principle, James will re-create each figure
again and again, each time you run James. Even if nothing changes. James
has a caching mechanism to prevent doing work twice. If any parameter
value changes, James will ignore the cache and create the figure. As an
alternative to caching, you may use create= n to
completely skip a figure.
To further speedup the process creating the figures, James by default
processes your figures in parallel. The degree of parallelism depends on
the number of nodes in your processor. You can set
[parallel](#parameter_parallel) = n in your
tab globals to force sequential processing.
James’ parallel processing and caching mechanism can speed-up the figure generation process. It’s parameters are the following.
It is easy to move an existing James installation to a new location
as James makes use of relative paths where possible. Especially in
M:/p_james/release/2024-10-10/R-header.R you need to update paths. If
you update James’ software, however, it may be wise to follow a tailored
installation script. You can find the two installation scripts in
M:/p_james/release/2024-10-10/ext/script/install-james-slow.R and
install-james-fast.R (the latter one uses the linux l02p
computer to speedup the process). In addition you should set at least
the following parameters (see tab ‘install’ in
M:/p_james/release/2024-10-10/ext/james-base-settings.xlsx): r_version, cpb_lib_version, james_version, install_local, install_status_production.
As a proof of success the script generates the manual from the
freshly installed version. Doing so guarantees that James can indeed
reproduce the wide variety of figures shown in the manual. In addition,
the install script puts james.bat and all respective xlsx-files
in a test directory:
m:/p_jamesgebruiker/test/[james_version](#parameter_james_version)/xlsx.
This enables a final test that is most closely to how end-users may run
James.
After installing James, you can install the corresponding ‘James
Start’ GUI interface. Please run
ext/gui/install-james-start.R to do so, after updating the
paths in this script to your situation. This script will install James
Start on james.cpb.nl/start.
James (version 2024-10-10) built this manual at
2024-10-10 12:39:49.615368. This took 37.3 seconds. The current version
of James counts 590 parameters.
Please add your feature requests or bug report here: https://tinyurl.com/james-feature-request, and <contact the author> afterwards, so it’s easy to
In general, the advice is to work in small steps; e.g.
changing one or two parameters at a time. This helps to isolate a
potential problem. However, if you think you’ve found a bug, you indeed
most likely did so. In which case, please first check whether there is a
new version available in M:/p_james/release. If not, then please put a
copy of your xlsx-file in M:/p_jamesgebruiker/q/$usr$
(please replace $usr$ with your own user name) and e-mail
your bug report to m.dijkstra@cpb.nl. Thanks!
On April 19, 2017, our King, Willem Alexander van Oranje-Nassau, officially opened our new building B30. That day, prof.dr. Bas Haring was one of the invited speaker. He encouraged us to present our results in terms of stories/parables. His idea inspired the author to frame the discussed software as a person called ‘James’. A personal servant ‘James’ for each of our colleagues!
Meinou de Vries created James’ logo. Many users exposed bugs in the software and came with valuable suggestions. Kudos to all of you!
This section lists all geo-regions you can choose from:
arbeidsmarktregio_2014, arbeidsmarktregio_2015, arbeidsmarktregio_2016, arbeidsmarktregio_2017, arbeidsmarktregio_2018, arbeidsmarktregio_2019, arbeidsmarktregio_2020, arrondissementsgebied_1995, arrondissementsgebied_1996, arrondissementsgebied_1997, arrondissementsgebied_1998, arrondissementsgebied_1999, arrondissementsgebied_2000, arrondissementsgebied_2001, arrondissementsgebied_2002, arrondissementsgebied_2003, arrondissementsgebied_2004, arrondissementsgebied_2005, arrondissementsgebied_2006, arrondissementsgebied_2007, arrondissementsgebied_2008, arrondissementsgebied_2009, arrondissementsgebied_2010, arrondissementsgebied_2011, arrondissementsgebied_2012, arrondissementsgebied_2013, arrondissementsgebied_2014, arrondissementsgebied_2015, arrondissementsgebied_2016, arrondissementsgebied_2017, arrondissementsgebied_2018, arrondissementsgebied_2019, arrondissementsgebied_2020, brandweerregio_1995, brandweerregio_1996, brandweerregio_1997, brandweerregio_1998, brandweerregio_1999, brandweerregio_2000, brandweerregio_2001, brandweerregio_2002, brandweerregio_2003, brandweerregio_2004, brandweerregio_2005, brandweerregio_2006, brandweerregio_2007, brandweerregio_2008, brandweerregio_2009, brandweerregio_2010, buurt_1995, buurt_1996, buurt_1997, buurt_1998, buurt_1999, buurt_2000, buurt_2001, buurt_2002, buurt_2003, buurt_2004, buurt_2005, buurt_2006, buurt_2007, buurt_2008, buurt_2009, buurt_2010, buurt_2011, buurt_2012, buurt_2013, buurt_2014, buurt_2015, buurt_2016, buurt_2017, buurt_2018, buurt_2019, buurt_2019_niet, buurt_2020, buurt_2020_niet, coropgebied_1995, coropgebied_1996, coropgebied_1997, coropgebied_1998, coropgebied_1999, coropgebied_2000, coropgebied_2001, coropgebied_2002, coropgebied_2003, coropgebied_2004, coropgebied_2005, coropgebied_2006, coropgebied_2007, coropgebied_2008, coropgebied_2009, coropgebied_2010, coropgebied_2011, coropgebied_2012, coropgebied_2013, coropgebied_2014, coropgebied_2015, coropgebied_2016, coropgebied_2017, coropgebied_2018, coropgebied_2019, coropgebied_2020, coropplusgebied_2005, coropplusgebied_2006, coropplusgebied_2007, coropplusgebied_2008, coropplusgebied_2009, coropplusgebied_2010, coropplusgebied_2011, coropplusgebied_2012, coropplusgebied_2013, coropplusgebied_2014, coropplusgebied_2015, coropplusgebied_2016, coropplusgebied_2017, coropplusgebied_2018, coropplusgebied_2019, coropplusgebied_2020, coropsubgebied_1995, coropsubgebied_1996, coropsubgebied_1997, coropsubgebied_1998, coropsubgebied_1999, coropsubgebied_2000, coropsubgebied_2001, coropsubgebied_2002, coropsubgebied_2003, coropsubgebied_2004, coropsubgebied_2005, coropsubgebied_2006, coropsubgebied_2007, coropsubgebied_2008, coropsubgebied_2009, coropsubgebied_2010, coropsubgebied_2011, coropsubgebied_2012, coropsubgebied_2013, coropsubgebied_2014, coropsubgebied_2015, coropsubgebied_2016, coropsubgebied_2017, coropsubgebied_2018, coropsubgebied_2019, coropsubgebied_2020, gemeente_1995, gemeente_1996, gemeente_1997, gemeente_1998, gemeente_1999, gemeente_2000, gemeente_2001, gemeente_2002, gemeente_2003, gemeente_2004, gemeente_2005, gemeente_2006, gemeente_2007, gemeente_2008, gemeente_2009, gemeente_2010, gemeente_2011, gemeente_2012, gemeente_2013, gemeente_2014, gemeente_2015, gemeente_2016, gemeente_2017, gemeente_2018, gemeente_2019, gemeente_2019_niet, gemeente_2020, gemeente_2020_niet, ggdregio_1995, ggdregio_1996, ggdregio_1997, ggdregio_1998, ggdregio_1999, ggdregio_2000, ggdregio_2001, ggdregio_2003, ggdregio_2004, ggdregio_2005, ggdregio_2006, ggdregio_2007, ggdregio_2008, ggdregio_2009, ggdregio_2010, ggdregio_2011, ggdregio_2012, ggdregio_2013, ggdregio_2014, ggdregio_2015, ggdregio_2016, ggdregio_2017, ggdregio_2018, ggdregio_2019, ggdregio_2020, grootstedelijke_agglomeratie_2000, grootstedelijke_agglomeratie_2001, grootstedelijke_agglomeratie_2002, grootstedelijke_agglomeratie_2003, grootstedelijke_agglomeratie_2004, grootstedelijke_agglomeratie_2005, grootstedelijke_agglomeratie_2006, grootstedelijke_agglomeratie_2007, grootstedelijke_agglomeratie_2008, grootstedelijke_agglomeratie_2009, grootstedelijke_agglomeratie_2010, grootstedelijke_agglomeratie_2011, grootstedelijke_agglomeratie_2012, grootstedelijke_agglomeratie_2013, grootstedelijke_agglomeratie_2014, grootstedelijke_agglomeratie_2015, jeugdregio_2015, jeugdregio_2016, jeugdregio_2017, jeugdregio_2018, jeugdregio_2019, jeugdregio_2020, kamervankoophandelregio_2008, kamervankoophandelregio_2009, kamervankoophandelregio_2010, kamervankoophandelregio_2011, kamervankoophandelregio_2012, kamervankoophandelregio_2013, kamervankoophandelregio_2014, kamervankoophandelregio_2015, kamervankoophandelregio_2016, kamervankoophandelregio_2017, kamervankoophandelregio_2018, kamervankoophandelregio_2019, kamervankoophandelregio_2020, landbouwgebied_1995, landbouwgebied_1996, landbouwgebied_1997, landbouwgebied_1998, landbouwgebied_1999, landbouwgebied_2000, landbouwgebied_2001, landbouwgebied_2002, landbouwgebied_2003, landbouwgebied_2004, landbouwgebied_2005, landbouwgebied_2006, landbouwgebied_2007, landbouwgebied_2008, landbouwgebied_2009, landbouwgebied_2010, landbouwgebied_2011, landbouwgebied_2012, landbouwgebied_2013, landbouwgebied_2014, landbouwgebied_2015, landbouwgebied_2016, landbouwgebied_2017, landbouwgebied_2018, landbouwgebied_2019, landbouwgebied_2020, landbouwgroep_1995, landbouwgroep_1996, landbouwgroep_1997, landbouwgroep_1998, landbouwgroep_1999, landbouwgroep_2000, landbouwgroep_2001, landbouwgroep_2002, landbouwgroep_2003, landbouwgroep_2004, landbouwgroep_2005, landbouwgroep_2006, landbouwgroep_2007, landbouwgroep_2008, landbouwgroep_2009, landbouwgroep_2010, landbouwgroep_2011, landbouwgroep_2012, landbouwgroep_2013, landbouwgroep_2014, landbouwgroep_2015, landbouwgroep_2016, landbouwgroep_2017, landbouwgroep_2018, landbouwgroep_2019, landbouwgroep_2020, landsdeel_1995, landsdeel_1996, landsdeel_1997, landsdeel_1998, landsdeel_1999, landsdeel_2000, landsdeel_2001, landsdeel_2002, landsdeel_2003, landsdeel_2004, landsdeel_2005, landsdeel_2006, landsdeel_2007, landsdeel_2008, landsdeel_2009, landsdeel_2010, landsdeel_2011, landsdeel_2012, landsdeel_2013, landsdeel_2014, landsdeel_2015, landsdeel_2016, landsdeel_2017, landsdeel_2018, landsdeel_2019, landsdeel_2020, nuts1_2003, nuts1_2006, nuts1_2010, nuts1_2013, nuts1_2016, nuts2_2003, nuts2_2006, nuts2_2010, nuts2_2013, nuts2_2016, nuts3_2003, nuts3_2006, nuts3_2010, nuts3_2013, nuts3_2016, politieregio_1995, politieregio_1996, politieregio_1997, politieregio_1998, politieregio_1999, politieregio_2000, politieregio_2001, politieregio_2002, politieregio_2003, politieregio_2004, politieregio_2005, politieregio_2006, politieregio_2007, politieregio_2008, politieregio_2009, politieregio_2010, politieregio_2011, politieregio_2012, politieregio_2013, provincie_1995, provincie_1996, provincie_1997, provincie_1998, provincie_1999, provincie_2000, provincie_2001, provincie_2002, provincie_2003, provincie_2004, provincie_2005, provincie_2006, provincie_2007, provincie_2008, provincie_2009, provincie_2010, provincie_2011, provincie_2012, provincie_2013, provincie_2014, provincie_2015, provincie_2016, provincie_2017, provincie_2018, provincie_2019, provincie_2020, regionaalmeld_coordinatiepunt_2017, regionaalmeld_coordinatiepunt_2018, regionaalmeld_coordinatiepunt_2019, regionaalmeld_coordinatiepunt_2020, regionale_eenheid_2014, regionale_eenheid_2015, regionale_eenheid_2016, regionale_eenheid_2017, regionale_eenheid_2018, regionale_eenheid_2019, regionale_eenheid_2020, regionale_energiestrategie_2018, regionale_energiestrategie_2019, regionale_energiestrategie_2020, regioplus_arbeidsmarktregio_2015, regioplus_arbeidsmarktregio_2016, regioplus_arbeidsmarktregio_2017, regioplus_arbeidsmarktregio_2018, regioplus_arbeidsmarktregio_2019, regioplus_arbeidsmarktregio_2020, ressort_2015, ressort_2016, ressort_2017, ressort_2018, ressort_2019, ressort_2020, rpagebied_2002, rpagebied_2003, rpagebied_2004, rpagebied_2005, rpagebied_2006, rpagebied_2007, rpagebied_2008, rpagebied_2009, rpagebied_2010, rpagebied_2011, rpagebied_2012, rpagebied_2013, rpagebied_2014, rpagebied_2015, rpagebied_2016, stadsgewest_2000, stadsgewest_2001, stadsgewest_2002, stadsgewest_2003, stadsgewest_2004, stadsgewest_2005, stadsgewest_2006, stadsgewest_2007, stadsgewest_2008, stadsgewest_2009, stadsgewest_2010, stadsgewest_2011, stadsgewest_2012, stadsgewest_2013, stadsgewest_2014, stadsgewest_2015, toeristengebied_1995, toeristengebied_1996, toeristengebied_1997, toeristengebied_1998, toeristengebied_1999, toeristengebied_2000, toeristengebied_2001, toeristengebied_2002, toeristengebied_2003, toeristengebied_2004, toeristengebied_2005, toeristengebied_2006, toeristengebied_2007, toeristengebied_2008, toeristengebied_2009, toeristengebied_2010, toeristengebied_2011, toeristengebied_2012, toeristengebied_2013, toeristengebied_2014, toeristengebied_2015, toeristengebied_2016, toeristengebied_2017, toeristengebied_2018, toeristengebied_2019, toeristengebied_2020, toeristengroep_2006, toeristengroep_2009, toeristengroep_2010, toeristengroep_2011, toeristengroep_2014, toeristengroep_2015, toeristengroep_2016, toeristengroep_2017, toeristengroep_2018, toeristengroep_2019, toeristengroep_2020, veiligheidsregio_2011, veiligheidsregio_2012, veiligheidsregio_2013, veiligheidsregio_2014, veiligheidsregio_2015, veiligheidsregio_2016, veiligheidsregio_2017, veiligheidsregio_2018, veiligheidsregio_2019, veiligheidsregio_2020, veiligthuisregio_2020, wijk_1995, wijk_1996, wijk_1997, wijk_1998, wijk_1999, wijk_2000, wijk_2001, wijk_2002, wijk_2003, wijk_2004, wijk_2005, wijk_2006, wijk_2007, wijk_2008, wijk_2009, wijk_2010, wijk_2011, wijk_2012, wijk_2013, wijk_2014, wijk_2015, wijk_2016, wijk_2017, wijk_2018, wijk_2019, wijk_2019_niet, wijk_2020, wijk_2020_niet, zorgkantoorregio_2009, zorgkantoorregio_2010, zorgkantoorregio_2011, zorgkantoorregio_2012, zorgkantoorregio_2013, zorgkantoorregio_2014, zorgkantoorregio_2015, zorgkantoorregio_2016, zorgkantoorregio_2017, zorgkantoorregio_2018, zorgkantoorregio_2019, zorgkantoorregio_2020.
This section lists all parameters, which are available to the user, in alphabetical order. Many of these parameters are already documented in the manual above. If you want to make use of a parameter that is documented poorly (sorry for that), please <contact the author>.
anakiwa_trans:
not documented yet. The value is
of type ‘string’. For the default
style the value is #87d2ff20.
area_stack_name:
name that explains what the sum
of the stacked areas means. The value is of type ‘string’. Figure(s) using ‘area_stack_name’:
NL’ers hebben buitenlandse obligaties.
arrow_angle:
angle between time series and arrow
head line (0…360). The value is of type
‘numeric’. Unit: ‘arc degree’. Example(s): 15, 75. For the
default style the value is 15.
arrow_col:
colour of the arrows that decorate
your line. The colours default to the colour of the time series the
appear on. If you supply one colour, all arrows will get the same
colour. The alternative is to supply one colour for each individual
arrow. The value is a list with elements of the
type ‘string’ separated by ‘,’. Example(s):
endeavour, rose, endeavour. Figure(s) using ‘arrow_col’:
Spanning op arbeidsmarkt blijft
toenemen, Spanning op arbeidsmarkt blijft
toenemen.
arrow_length_cm:
length of arrow head line. The
value is of type ‘numeric’. Unit: ‘cm’.
Example(s): 0.5, 1, 2. For the default style the
value is 0.2.
arrow_n:
number of arrows on time series of type
line. If you provide 1 number, then this number represents the total
number of arrows on all ‘line time series’ together. If there are k >
1 time series of type line, as an alternative to providing only one
number, you can provide k numbers. In that case you set the number of
arrows for each of the line time series individually. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
5; 3, 2, 3, 4. See also parameter(s): arrow_position_pct. Figure(s)
using ‘arrow_n’: Spanning op arbeidsmarkt
blijft toenemen, Spanning op
arbeidsmarkt blijft toenemen.
arrow_position_pct:
consider all time series of
type ‘line’ glued together as one large curve. The percentage
corresponds to the distance traveled on ‘printed paper’, i.e.,
irrespective of the values on the axes. The start of the curve is 0%,
the end is 100%. Distances and percentages You can use this parameter to
specify the locations at which you want to position an arrow. Please
note that 0% is not allowed, use 1% instead. In addition, parameter
‘arrow_position_pct’ and ‘arrow_n’ are mutually exclusive, i.e. you
should define at most one of the two. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Unit: ‘%’.
Example(s): 1, 25, 50, 75, 100. See also parameter(s): arrow_n. Figure(s) using
‘arrow_position_pct’: Spanning op arbeidsmarkt
blijft toenemen.
author: put
here the author if you don’t want to use the default. The value is of type ‘string’. Example(s): "r
whoami::fullname()".
axis_barplot_col:
colour of extra axis in
barplot. The value is of type ‘string’. For the
default style the value is black. See also
parameter(s): axis_barplot_lwd.
axis_barplot_lwd:
line width of axis at y = 0 in
case of barplot. The value is of type
‘numeric’. For the default style the value is 1.
See also parameter(s): axis_barplot_col.
bar_gap_fraction:
how much space you want between
the bars of two consecutive x-points, where 0 means no gap, 1 means no
bars. The value is of type ‘numeric’. Unit:
‘fraction’. Example(s): 0, 0.1. For the default
style the value is 0.2. Figure(s) using ‘bar_gap_fraction’:
Decompositie gemiddelde marginale belastingdruk
werknemers 2021 .
bar_lab_big_mark_show:
for the values in or above
bars, use y if you want a character between every three
digits left of the decimal separator. The value is of type ‘bool’. For the default style the
value is y.
bar_lab_col:
color of the labels. The value is of
type ‘string’. For the default style
the value is black.
bar_lab_font_style:
1 = normal, 2 = bold, 3 =
italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s):
1, 2, 3, 4. For the default style the value is
1.
bar_lab_n_decimals:
the number of decimals the
bar labels should get. The value is of type
‘numeric’. For the default style the value is 0.
bar_lab_rotation:
rotate the barplot labels. Zero
(0) for horizontal. 90 for vertical. Leave empty for default
(i.e. horizontal for labels on top of the bars, vertical for
labels inside the bars). The value is of type
‘numeric’. Unit: ‘degrees’. Example(s): 0, 90. For the
default style the value is [not set].
bar_lab_show:
you can show the value of the bar
on top of it, or in its middle. The value is of type ‘bool’. For the default style the
value is n. See also parameter(s): bar_lab_n_decimals, bar_lab_top, bar_lab_increase_y_lim_2.
Figure(s) using ‘bar_lab_show’: kansrijk.
bar_lab_top:
y means top,
n means middle. The value is of type ‘bool’. For the default style the
value is y.
bar_stack_index:
the position where the stacked
bars should appear if you also have bars next to each other. Default is
at the right. The value is of type ‘numeric’.
Figure(s) using ‘bar_stack_index’:
Number of phones in the world.
bar_stack_name:
name that explains what the sum
of the stacked bars means. The value is of type
‘string’. Figure(s) using ‘bar_stack_name’:
Number of phones in the world.
base-settings-path:
path to default settings file
as shipped with the package. The value is of type ‘string’. Example(s):
path/to/package/james-base-settings.xlsx. For the
default style the value is
ext/james-base-settings.xlsx.
bg_col:
background color in your figures. The
value is of type ‘string’. For the
default style the value is #eef8ff. For the
kansrijk style the value is #ffffff.
big_mark:
big mark is put beween every 3 decimals
before the decimal separator. The value is of type ‘string’. Example(s): . or ,.
For the default style the value is .. For the
english style the value is ,.
box_col_all_equal:
if y, all boxes
get the same color. The value is of type
‘bool’. For the default style the value is n.
Figure(s) using ‘box_col_all_equal’: Kans om in
risicogroep te zitten.
box_col_per_group:
usually you want one color per
group (y). But you may choose to give each box its own
color. The value is of type ‘bool’. For the
default style the value is y.
box_gap_fraction:
not documented yet. The value
is of type ‘numeric’. For the default
style the value is 0.2. For the box-plot style the
value is 0.5.
box_lab_big_mark_show:
for the values
(e.g. median) in box plots, use y if you want a character
between every three digits left of the decimal separator. The value is
of type ‘bool’. For the default style
the value is y.
box_median_col:
if empty, same color as box. The
value is of type ‘string’. Example(s):
gray30. Figure(s) using ‘box_median_col’:
Kans om in risicogroep te zitten.
box_median_lab_font_size:
scale font size of
label next to median The value is of type
‘numeric’. Example(s): 1. For the default style
the value is 0.7.
box_median_lab_n_decimals:
number of decimals of
value in label The value is of type ‘numeric’.
For the default style the value is 2. Figure(s)
using ‘box_median_lab_n_decimals’: Kans om in
risicogroep te zitten.
box_median_lab_show:
show median value next to
median The value is of type ‘bool’. For the
default style the value is n. For the
box-plot style the value is y. Figure(s) using
‘box_median_lab_show’: Kans om in risicogroep te
zitten.
box_median_lab_suffix:
pasted after median value.
Please note that by default James trims whitespaces at start and end of
strings. You can use ‘’ (without quotes) to add the whitespace
character. The value is of type ‘string’.
Example(s): %, \s%. Figure(s) using
‘box_median_lab_suffix’: Kans om in risicogroep te
zitten.
box_median_line_extension_factor:
put at zero to
make length equal to box_width. The value is of type ‘numeric’. Unit: ‘fraction of box_width’. For
the default style the value is 0.2.
box_median_shape:
0 = line, rest is symbols like
in R (try 19 for filled dot). The value is of type ‘numeric’. For the default style the
value is 0. Figure(s) using ‘box_median_shape’:
Kans om in risicogroep te zitten.
box_median_shape_size:
not documented yet. The
value is of type ‘numeric’. For the
default style the value is 0.5.
box_name_as_x_lab:
not documented yet. The value
is of type ‘bool’. For the default
style the value is y.
box_quantiles:
not documented yet. The value is a
list with elements of the type ‘numeric’ separated by ‘,’. For the
default style the value is 0, .25, .5, .75, 1.
Figure(s) using ‘box_quantiles’: Kans om in
risicogroep te zitten.
cache: use
caching mechanism to prevent the re-creation of the exact same figure if
you rerun James. The value is of type ‘bool’.
For the default style the value is y.
caption:
caption if used in Markdown report. The
value is of type ‘string’. Example(s):
This text explains what you see In the figure.. Figure(s)
using ‘caption’: Bestaande
koopwoningen, A discontinuity.
cbs_url:
on cbs.nl, find data and click ‘share’.
Copy/paste the share-url here. The value is of type ‘string’. Figure(s) using ‘cbs_url’:
Bestaande koopwoningen,
Eerste indruk: corona treft ouderen
buitenproportioneel, Tweede
indruk coronadoden: relatief geen verschil 65-80 en 80+,
Bestaande koopwoningen.
col_order:
change color order. You may reuse
colors as is show in the example. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
3, 1, 1, 2, 2. Figure(s) using ‘col_order’:
Eerste indruk: corona treft ouderen
buitenproportioneel, Tweede
indruk coronadoden: relatief geen verschil 65-80 en 80+.
color: holds
the resulting colors in the same order as they are needed during the
plotting phase. If you don’t specify its values, the variable will be
automatically set during the pre-processing phase based on palette,
highlighting, etc. The value is a list with
elements of the type ‘string’ separated by ‘,’.
cpb_lib_version:
use this version of CPB packages
The value is of type ‘string’. For the
default style the value is cpb_3.
create:
using this parameter you can temporarily
disable the creation of a figure. James creates figures if and only if
this value is y. The default is y, unless a
report is generated, in which case the value is set to n.
However, if you set ‘create = n’ for the report, then the default is
y again. The value is of type
‘bool’. For the default style the value is y. See
also parameter(s): filter. Figure(s)
using ‘create’: Bestaande
koopwoningen, Eerste indruk: corona treft
ouderen buitenproportioneel,
Tweede indruk coronadoden:
relatief geen verschil 65-80 en 80+,
Bestaande koopwoningen.
custom:
your parameters are available as
p$parameter. You have acces to your data as follows. The x-values are in
p$data[, 1]. The first time series is p$data[, 2], the second is
p$data[, 3], etc. If you generate figures from R (i.e. not
Excel), you may define a function ‘custom <- function(p) { … }’ with
a custom implementation instead. The value is of type ‘string’. Example(s):
lines(p$data[, 1], mean(p$data[, 2:3])). Figure(s) using
‘custom’: Eerste indruk: corona treft ouderen
buitenproportioneel, Tweede
indruk coronadoden: relatief geen verschil 65-80 en 80+,
Older workers more productive?.
date: what
you want as date. You may use the example if you want today’s date. The
value is of type ‘string’. Example(s):
"r format(Sys.Date())".
decimal_mark:
decimal separator. The value is of
type ‘string’. Example(s): . or ,.
For the default style the value is ,. For the
english style the value is ..
destination_path:
not documented yet. The value
is of type ‘path’. For the default
style the value is ./generated.
dot_shape:
there are over 20 symbols you can
choose from; they are all shown in one of the figures in the manual.
There are two types of alternatives to the shapes. Firstly, you can use
‘.’ (a period) to specify very small dots. Secondly, you can use a
single character (e.g. a letter, digit or sign (e.g. a, 1, or %)). The
value is a list with elements of the type ‘numeric’ separated by ‘,’. For the
default style the value is 19. For the
ppower style the value is .. Figure(s) using
‘dot_shape’: Verlies van banken na afschrijving 20%
van de overheidsschuld van GIIPS-landen.
dot_size:
size of symbol, c.q. dot. The value is
a list with elements of the type ‘numeric’ separated by ‘,’. For the
default style the value is 1. Figure(s) using
‘dot_size’: Older workers more
productive?, Overlapping labels (NL,
PT), Different alignment
for PT, Verwacht verlies in verschillende
scenario’s, Two series of whiskers in
one plot, Verwacht verlies in
verschillende scenario’s.
draft:
lowers resolution of png and jpg to 150
ppi to save creation time. This results in less sharp figures. Please
beware that 150 ppi is below the standard for publication, which is 600
ppi. The value is of type ‘bool’. For the
default style the value is n. See also
parameter(s): resolution, lock.
fig_name:
not documented yet. The value is of type ‘string’. For the default style the
value is use this as name in output of james-publish.R.
file: base
file name of figure, id est, before the suffix .jpg, .pdf, .png or .svg
is added. The value is of type ‘string’.
Example(s): my-beautiful-figure. See also parameter(s): file_correct_name.
filter:
filter that is used when importing data.
The value is of type ‘string’. For the
default style the value is create.
first_col_grouping:
this parameter defines
whether or not the first column in the data tab represents normal
x-values (first_col_grouping = n) or whether it contains
group names for the x-values (first_col_grouping = y). If
you don’t set this parameter, James tries to guess the value of this
parameter as follows. If the second column contains at least one
character (i.e. a non-numeric value),
first_col_grouping will be set to y
automatically. Otherwise it is set to n automatically. You
can overrule the automatic settings by setting this parameter by hand.
This may happen if the values on the x-axis are numerical. The value is
of type ‘bool’. Figure(s) using
‘first_col_grouping’: Tozo.
first_row_grouping:
this parameter is for boxes
only. See section box plot. It defines
whether or not the first row in your data tab contains group names of
your time series box plot. Boxes can be grouped, which gives the boxes
in the same group the same ‘header’ (and the same color if you want to).
You should put the group names in the first row, i.e. above the
time series names. In most cases you don’t have to set this parameter
manually as James will automatically set the value of parameter
first_row_grouping = y if any of the time series comprises
a character. If James erroneously puts group names above your boxes, you
can manually overrule this by setting
first_row_grouping = n. The value is of type ‘bool’.
font: the
font of all the text in your figure. The value is of type ‘string’. Example(s):
RijksoverheidSansText, sans, serif, mono, avenir. For the
default style the value is RijksoverheidSansText.
font_size:
size of a point in terms of pixels
(for png). Vector graphics (pdf, svg) scaled accordingly. If you don’t
set this value, James will set the value dependent on the resolution.
For a resolution of 150 ppi, the point size is set to 7 pixels. Point
size for other resolutions is scaled proportionally. The value is of type ‘numeric’. Unit: ‘pixels’. For the
default style the value is 7.
footnote:
footnote, placed at bottom of figure,
aligned right by default. The value is of type
‘string’. Example(s): ¹this is a footnote. Figure(s) using
‘footnote’: Six different line types,
Oversterfte in 2020,
Heatmap stressing low and high values,
Heatmap stressing low values,
Heatmap stressing high values,
Heatmap stressing middle values,
Bestaande koopwoningen,
Eerste indruk: corona treft ouderen
buitenproportioneel, Tweede
indruk coronadoden: relatief geen verschil 65-80 en 80+,
Forecasted from 1958,
Bestaande koopwoningen,
Investeringen in Nederland¹ door de zwaarst-
getroffen eurolanden in 2018 en vice versa,
Standard normal distribution,
Arbeidsmarktregio’s in 2020 volgens CBS,
Participatie gemeenten,
World import, customs or balance of payments
(prices), change in july, 2020., World
trade volume change last month, World
trade volume change last month:, Verlies van
banken na afschrijving 20% van de overheidsschuld van GIIPS-landen,
Toeslagen,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
VMBO,
Two series of whiskers in one plot,
Mathematical expression in legend.
footnote_col:
not documented yet. The value is of
type ‘string’. For the default style
the value is black. Figure(s) using ‘footnote_col’:
Six different line types,
Tweede indruk coronadoden:
relatief geen verschil 65-80 en 80+,
Toeslagen,
VMBO.
footnote_font_size:
size of footnote text. The
value is of type ‘numeric’. For the
default style the value is 0.85.
footnote_x:
distance from left/right side of
figure. The value is of type ‘numeric’. Unit:
‘cm’. For the default style the value is 0.25.
footnote_y:
distance from bottom/top of figure.
The value is of type ‘numeric’. Unit: ‘cm’. For
the default style the value is 0.15.
force_y_at:
normally James adds whitespace around
the graph (see parameter empty_fraction_plot). You can force James to
put the gridlines at precisely y_at (value: y). Otherwise (value: n)
James will add extra gridlines if necessary. The value is of type ‘bool’. For the default style the
value is n.
forecast_below_gridline:
text above or below
upper gridline. The value is of type ‘bool’.
For the default style the value is y.
forecast_bg_col:
background color for
forecasting. The value is of type ‘string’. For
the default style the value is #ffffff. For the
kansrijk style the value is gray95.
forecast_bg_show:
show background color behind
forecasted part of series. The value is of type
‘bool’. For the default style the value is y.
forecast_col_transparency:
forecasted areas/bars
have this transparency level. Zero means no transparancy, one means full
transparancy. PLEASE REMOVE THIS PARAMETER. NO LONGER USED. WE NOW
‘shade’ BARS/AREAS The value is of type
‘numeric’. Unit: ‘fraction (0..1]’. Example(s):
0.3, 0.5, 0.7. For the default style the value is
0.
forecast_font_size:
size of forecast_text. The
value is of type ‘numeric’. For the
default style the value is 0.9.
forecast_font_style:
1 = normal, 2 = bold, 3 =
italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s):
1, 2, 3, 4. For the default style the value is
3.
forecast_shading_angle:
slope of shading lines,
given as an angle (counter-clockwise). The value is of type ‘numeric’. Unit: ‘degrees’. Example(s):
0, 45, 90, 135. For the default style the value is
45.
forecast_shading_col:
color of forecast shading.
Default color is background color of the figure. The value is of type ‘string’. For the default style the
value is bg_col.
forecast_shading_col_transparency:
transparency
of shading. The value is of type ‘numeric’.
Unit: ‘fraction (0..1]’. Example(s): 0.3, 0.5, 0.65. For
the default style the value is 0.65.
forecast_shading_density:
density of shading of
areas and bars that are forecasted. The value is of type ‘numeric’. Unit: ‘cm^-1’. Example(s):
5, 10, 20. For the default style the value is
10.
forecast_shading_show:
by default shading is
added to forecasted bars/areas. The value is of type ‘bool’. For the default style the
value is n.
forecast_text:
text that marks the start of the
forecast. The value is of type ‘string’. For
the default style the value is raming. For the
english style the value is prognosis.
forecast_text_col:
color of the forecast_text.
The value is of type ‘string’. For the
default style the value is brown.
forecast_text_show:
add text at top of plot (or
right side for turned plots) to mark start of forecast. The value is of
type ‘bool’. For the default style the
value is y.
forecast_x:
the x-value (usually a date) that
separates observed values from predicted values. The value is of type ‘numeric’. Figure(s) using ‘forecast_x’:
Bbp tijdens crises,
Forecasted from 1958,
Geraamd vanaf 1958.
formula:
append outcome of formula after last
column to data. Please note, your data x-values are in p$data[, 1]. The
first series’ values are in p$data[, 2], the second in p$data[, 3] and
so on. So, the example determines the mean of the first and second
series. The value is of type ‘string’.
Example(s): rowMeans(p$data[, 2:3]). Figure(s) using
‘formula’: Hello World.
formula_name:
legend name of formula. The value
is of type ‘string’. Example(s):
sinus. Figure(s) using ‘formula_name’:
Hello World.
geo_border_col:
not documented yet. The value is
of type ‘string’. Example(s):
black. For the default style the value is
gray.
geo_border_lwd:
not documented yet. The value is
of type ‘numeric’. Example(s): 1.
For the default style the value is 0.5.
geo_cbs_available_maps:
not documented yet. The
value is of type ‘path’. For the
default style the value is ext/geo/cbs-maps.RData.
geo_cbs_map:
this parameter specifies a specific
division of The Netherlands in regions. See appendix of manual for the
full list of options currently available. The value is of type ‘string’. Example(s):
arbeidsmarktregio_2018. Figure(s) using ‘geo_cbs_map’:
geo-first-example,
Arbeidsmarktregio’s in 2020 volgens CBS,
Participatie gemeenten.
geo_cbs_url_base:
first part of url that is used
to download geographic data originating from CBS. Please edit the url if
you need to. The value is of type ‘string’. For
the default style the value is
https://geodata.nationaalgeoregister.nl/cbsgebiedsindelingen/wfs?request=GetFeature&service=WFS&version=2.0.0&outputFormat=json&typeName=cbs_.
geo_cbs_url_centroid:
part of url that is pasted
after the region name (for centroids so labels can be placed). The value
is of type ‘string’. For the default
style the value is _labelpoint.
geo_cbs_url_polygon:
part of url that is pasted
after the region name (for polygons). The value is of type ‘string’. For the default style the
value is _gegeneraliseerd.
geo_col_threshold:
the order of the values of
this parameter correspond to the order of the colors in your palette.
Regions with the first (second, third, etc.) value will get the first
(second, third, etc.) color from your palette. Regions with other values
will be be colored by linear interpolation of the colors in your
palette. Regions with values outside the range of this parameter will
get the figure’s background color. The values in this parameter must be
stricktly increasing. The value is a list with
elements of the type ‘numeric’ separated by
‘,’. Example(s): 0, 100. See also parameter(s): palette, palette_blue. Figure(s) using
‘geo_col_threshold’: Arbeidsmarktregio’s in
2020 volgens CBS.
ghostscript_executable_windows:
used to put font
in pdf. Full path (2020-01-19) is s:/Applicaties/CPB/GS/bin/gswin64.exe
The value is of type ‘path’. For the
default style the value is gs -version=9.52.
gif: export
figure as gif. The value is of type ‘bool’. For
the default style the value is n. See also
parameter(s): gif_n_frames, gif_delay, gif_loop, png.
gif_delay:
delay between frames in gif. The value
is of type ‘numeric’. Unit: ‘s’. For the
default style the value is 0.1. See also
parameter(s): gif_n_frames, gif_delay, gif_loop, png.
gif_loop:
loop gif. The value is of type ‘bool’. For the default style the
value is n. See also parameter(s): gif_n_frames, gif_delay, gif_loop, png.
gif_n_frames:
number of frames in gif. The value
is of type ‘numeric’. For the default
style the value is 20. See also parameter(s): gif_n_frames, gif_delay, gif_loop, png.
grid_lines_col:
not documented yet. The value is
of type ‘string’. For the default
style the value is black.
grid_lines_lwd:
line width. The value is of type ‘numeric’. For the default style the
value is 0.25. Figure(s) using ‘grid_lines_lwd’:
Mathematical expression in legend.
group: names
of groups. If given, number of elements should equal number of time
series. The value is a list with elements of
the type ‘string’ separated by ‘;;’.
Example(s): group-1;; group-2;; group-2. See also
parameter(s): first_row_grouping, box_col_per_group, name.
group_col:
not documented yet. The value is of type ‘string’. For the default style the
value is black.
group_font:
1 = normal, 2 = bold, 3 = italic, 4 =
bold and italic. The value is of type
‘numeric’. Example(s): 1, 2, 3, 4. For the default
style the value is 2.
group_font_size:
not documented yet. The value is
of type ‘numeric’. For the default
style the value is 1.
group_spacing:
extra space between groups. The
value is of type ‘numeric’. Example(s):
0, 0.5, 1, 2. For the default style the value is
0. Figure(s) using ‘group_spacing’:
VWO,
Tozo,
Investeringen in Nederland¹ door de zwaarst-
getroffen eurolanden in 2018 en vice versa.
group_x:
the x-positions of the group names.
James will set them automatically if not specified by user. Please
beware that the group names should be placed at different positions,
dependent on the orientation of your plot (i.e.,
turn = y or turn = n). The value is a list with elements of the type ‘numeric’ separated by ‘,’.
hash_dir:
path to hashes. The value is of type ‘path’. For the default style the
value is ./generated/cache.
heatmap_gray:
not documented yet. The value is of
type ‘string’. For the default style
the value is #D7C8C8.
heatmap_legend_labels:
labels in legend. Should
have same number of values as parameter ‘heatmap_legend_values’. The
value is a list with elements of the type ‘string’ separated by ‘;;’. Example(s):
min;; mid;; max. See also parameter(s): heatmap_legend_values, heatmap_legend_n_items, heatmap_legend_labels_n_decimals.
heatmap_legend_labels_big_mark_show:
for the
values in the legend, use yes (or no) if you
(do not) want a character between every three digits left of the decimal
separator. The value is of type ‘bool’.
Example(s): y, n. For the heatmap style the value
is y.
heatmap_legend_labels_n_decimals:
number of
decimals of values in heatmap legend. The value is of type ‘numeric’. Example(s): 0, 1, 2.
For the heatmap style the value is 2. Figure(s)
using ‘heatmap_legend_labels_n_decimals’:
Number of phones in the world.
heatmap_legend_n_items:
sets number of items in
legend. Leave equal to make the number equal to the maximum of 4 and the
number of colors in the color panel. The items are equally spaced from
min to max value in data. The value is of type
‘numeric’. Example(s): 2, 5, 10.
heatmap_legend_values:
values for labels in
legend. If not specified, then the number of values is set equal to the
value of parameter ‘heatmap_legend_n_items’. Should have same number of
values as parameter ‘heatmap_legend_labels’ if the user speficies that
parameter. The value is a list with elements of
the type ‘numeric’ separated by ‘,’.
Example(s): 0, 50, 100. See also parameter(s): heatmap_legend_labels, heatmap_legend_n_items.
heatmap_line_col:
colour of line around each
rectangle in heatmap. The value is of type
‘string’. See also parameter(s): heatmap_line_width.
heatmap_line_width:
width of line around each
rectangle in heatmap. The value is of type
‘numeric’. For the heatmap style the value is 1.
See also parameter(s): heatmap_line_col.
heatmap_x_axis_asis:
if y, then each
value on the x-axis is shown ‘as is’ and copied exactly from your data
tab. If n (only applicable for numbers), James will
construct an axis with values, just like in a normal figure The value is
of type ‘bool’. Example(s): y, n.
See also parameter(s): heatmap_y_axis_asis. Figure(s)
using ‘heatmap_x_axis_asis’: Number of phones
in the world.
heatmap_y_axis_asis:
analog to
‘heatmap_x_axis_asis’ for the y-axis. The value is of type ‘bool’. Example(s): y, n. See
also parameter(s): heatmap_x_axis_asis.
heatmap_z_lim:
range for values in heatmap.
Defaults to min/max of data. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
0, 100. Figure(s) using ‘heatmap_z_lim’:
Number of phones in the world.
height:
height of the resulting image. The value
is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 7.5. For the
small style the value is 6.8. For the
kansrijk style the value is 7. For the
big style the value is 15. For the slide
style the value is 11.7. For the slide-wide style
the value is 11.7. For the tall style the value is
15.5. For the world-map style the value is
8.5. For the world-map-www style the value is
9.
highlight_col:
for highlighting a time series.
The value is of type ‘string’. Example(s):
#ffa500. For the default style the value is
rose. Figure(s) using ‘highlight_col’:
Number of phones (Europe yellow).
highlight_series:
time series you want to
highlight. The value is of type ‘numeric’.
Figure(s) using ‘highlight_series’:
Number of phones (Europe yellow),
Europese steunpakketten,
Decompositie gemiddelde marginale belastingdruk
werknemers 2021 , Verlies van banken na
afschrijving 20% van de overheidsschuld van GIIPS-landen.
highlight_x:
if you want to highlight a time
series of type ‘bar’, with this parameter you can narrow the highlight
to only one given x-position. The x-position specified here, is
interpreted as a number (only if all values on the x-axis are numbers)
or as a string (if at least one of the values on the x-axis is a
string). Obviously, you can highlight more than one value (of one and
the same time series). The value is a list with
elements of the type ‘string’ separated by
‘;;’. Unit: ‘x’. Example(s): bbp. Figure(s) using
‘highlight_x’: Europese steunpakketten.
hist_breaks:
number of cells (bars) you want in
the histogram. If you leave this empty, James will do an educated guess.
The value is of type ‘numeric’. Example(s):
10.
hist_freq:
if y, the histogram
graphic is a representation of frequencies (i.e. counts). If
n, probability densities are plotted so that the histogram
has a total area of one if you set bar_gap_fraction = 0.
The value is of type ‘bool’. For the
default style the value is y. See also
parameter(s): bar_gap_fraction.
hline_bold:
by default the lowest gridline is
bold. Except if your plot contains bars and zero is visible, then the
default is zero. If you want the bold line(s) to appear at other places,
you can specify the(ir) y-value(s) here. The value is of type ‘numeric’. For the ppower style the
value is 0. Figure(s) using ‘hline_bold’:
Hello World,
Bbp tijdens crises,
Partly dashed line,
Oversterfte in 2020,
VWO,
VWO,
trend-vs-niveau.
hline_bold_col:
line color. The value is of type ‘string’. For the default style the
value is black.
hline_dash:
not documented yet. The value is of
type ‘numeric’. Figure(s) using ‘hline_dash’:
Kans om in risicogroep te zitten,
Tweede indruk coronadoden:
relatief geen verschil 65-80 en 80+,
Two series of whiskers in one plot.
hline_dash_col:
not documented yet. The value is
of type ‘string’. For the default
style the value is black.
hline_dash_lty:
not documented yet. The value is
of type ‘numeric’. For the default
style the value is 3.
hline_dash_lwd:
not documented yet. The value is
of type ‘numeric’. For the default
style the value is 1.
id: unique
identifier that can be used for plotting in reports (plot(id), or
plot(“my-file.xlsx”, id = “nice-fig”)). In addition, it can be used to
distinguish two different figures in the same xlsx file, that share one
and the same data tab. The value is of type
‘string’.
install_local:
y: local installation; n: remote
installation The value is of type ‘bool’. For
the default style the value is n.
install_root_remote_prod_use_time_rs:
not
documented yet. The value is of type ‘path’.
For the default style the value is
/cifs/p_james/release.
install_status_production:
y: production; n:
development The value is of type ‘bool’. For
the default style the value is y.
james_publish_bat_path:
not documented yet. The
value is of type ‘r’. For the default
style the value is
paste0("james-publish-", get_param("james_version"), ".bat").
james_publish_path_on_m:
not documented yet. The
value is of type ‘r’. For the default
style the value is
file.path(get_param("install_root_remote_prod_use_time"), get_param("james_version"), get_param("james_publish_Rscript")).
james_publish_Rscript:
not documented yet. The
value is of type ‘string’. For the
default style the value is james-publish.R.
james_server_2:
not documented yet. The value is
of type ‘string’. For the default
style the value is james-l02p.
james_server_2_path:
not documented yet. The
value is of type ‘r’. For the default
style the value is
paste0(get_param("james_server_2"), "-", get_param("james_version"), ".bat").
james_sh_path:
not documented yet. The value is
of type ‘r’. For the default style the
value is
paste0("james-", get_param("james_version"), ".sh").
james_url:
not documented yet. The value is of type ‘r’. For the default style the value
is
paste0("https://james.cpb.nl/manual/", get_param("manual_file_name")).
james_version:
james version. Standard format:
dev-yyyy-mm-dd (dev = development stage, yyyy = four digit calendar, mm
= two digit month, dd = two digit day of month). The value is of type ‘string’. For the default style the
value is 2024-10-10.
james_windows:
not documented yet. The value is
of type ‘string’. For the default
style the value is james-windows.
james_windows_path:
not documented yet. The value
is of type ‘r’. For the default style
the value is
paste0(get_param("james_windows"), "-", get_param("james_version"), ".bat").
kmev2021:
not documented yet. The value is of type ‘path’. For the default style the
value is ext/report/kmev2021/james-kmev2021.xlsx.
kmev2021_result:
not documented yet. The value is
of type ‘path’. For the default style
the value is ext/report/kmev2021/james-kmev2021.html.
label_font_size:
relative to font size of title.
The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the
default style the value is 1. Figure(s) using
‘label_font_size’: Overlapping labels
(NL, PT), Different
alignment for PT.
label_series_n:
the number of the time series
that you want to label. The value is of type
‘numeric’. For the default style the value is 1.
labels_margin_add_for_groups:
minimal distance
between group name and series name. The value is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 0.
labels_margin_left:
margin left of title,
y_title, y_lab. Same margin is used at right side of main title if it is
automatically rescaled if it grows to wide. The value is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 0.45.
labels_margin_right:
margin right of x_title. The
value is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 0.45.
latest-version-txt-file:
not documented yet. The
value is of type ‘string’. For the
default style the value is latest-version.txt.
legend_column_space:
space between columns in
legend. The value is of type ‘numeric’. Unit:
‘cm’. For the default style the value is 0.375.
legend_dot_col_trans:
if a dot is transparent in
the figure, should it be transparent in legend too? The value is of type ‘bool’. For the default style the
value is n.
legend_font_size:
relative font size in legend.
The value is of type ‘numeric’. For the
default style the value is 1.
legend_font_style:
1 = normal, 2 = bold, 3 =
italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s):
1, 2, 3, 4. For the default style the value is
3.
legend_forecast_show:
added shaded block with
dashed line to legend if forecast_x is set. The value is of type ‘bool’. For the default style the
value is y. See also parameter(s): forecast_x.
legend_forecast_text:
forecast in right language.
The value is of type ‘string’. For the
default style the value is start raming. For the
english style the value is prognosis.
legend_line_distance:
space between lines in
legend. The value is of type ‘numeric’. Unit:
‘cm’. For the default style the value is 0.315.
legend_math:
enables the use of Greek characters
(e.g. mu, sigma), subscript (e.g. f[x]) and superscript (e.g. ^2) in
time series names. Please beware: use a tilde (~) to indicate a
whitespace. The value is of type ‘bool’.
Example(s): a^2, mu, y[x]. For the default style
the value is n. Figure(s) using ‘legend_math’:
Mathematical expression in legend.
legend_n_per_column:
number of time series names
per column in legend. The value is of type
‘numeric’. Example(s): 1, 4. For the default style
the value is 3. For the fan style the value is
4. For the ppower style the value is
4. Figure(s) using ‘legend_n_per_column’:
Investeringen in Nederland¹ door de zwaarst-
getroffen eurolanden in 2018 en vice versa,
Impact no-deal Brexit (horizontal),
VMBO,
Verwacht verlies in verschillende
scenario’s, Mathematical
expression in legend.
legend_order:
use this to shuffle order or make
selection (example shows only series 1, 3 and 5). The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
1, 3, 5. Figure(s) using ‘legend_order’:
Partly dashed line,
NL’ers hebben buitenlandse obligaties,
Cohorten omvatten veel asielmigranten,
Participatie gemeenten,
Two series of whiskers in one plot.
legend_show:
put at n if you don’t
want a legend. Doing so will keep the rest of the figure unchanged. If
you want to make use of the space that emerges from hiding the legend,
you can set ‘style = no-legend’. The value is of type ‘bool’. For the default style the
value is y. For the no-legend style the value is
n. See also parameter(s): style.
legend_space_symbol_txt:
space between symbol and
text. The value is of type ‘numeric’. Unit:
‘cm’. For the default style the value is 0.15.
legend_symbol_height:
not documented yet. The
value is of type ‘numeric’. Unit: ‘fraction of
legend_line_distance’. For the default style the
value is 0.8. See also parameter(s): legend_line_distance.
legend_symbol_width:
width of symbol in legend.
The value is of type ‘numeric’. Unit: ‘cm’. For
the default style the value is 0.3.
legend_x:
position of left side of legend. The
value is of type ‘numeric’. Unit: ‘cm’.
Example(s): 0.03. For the default style the value
is 0.45.
legend_y:
position of top of legend, seen from
bottom of figure. The value is of type
‘numeric’. Unit: ‘cm’. Example(s): 0.12. For the
default style the value is 1.3. For the
map style the value is 1.08. Figure(s) using
‘legend_y’: VWO,
Investeringen in Nederland¹ door de zwaarst-
getroffen eurolanden in 2018 en vice versa,
Impact no-deal Brexit (horizontal).
light_gray:
not documented yet. The value is of
type ‘string’. For the default style
the value is #D7C8C8.
light_green:
not documented yet. The value is of
type ‘string’. For the default style
the value is #81CB7A.
light_rose:
not documented yet. The value is of
type ‘string’. For the default style
the value is #FCCAD6.
lightest_green:
not documented yet. The value is
of type ‘string’. For the default
style the value is #CEEAC9.
line_distance:
the line height multiplier.
Distance between lines if you use a newline. A newline is a backslash,
directly followed by the letter n. The value is of type ‘numeric’. Unit: ‘a.u.’. Example(s):
0.8. For the default style the value is
0.8.
line_lty:
line type (1: continuous; 2, 3, … have
dashes). For dashes the advice is to use 3. Please beware that the
forecasted part of a line is automatically dashed, unless you specify
this parameter. The value is a list with
elements of the type ‘numeric’ separated by
‘,’. Example(s): 1, 1, 3, 1 if the third line is dashed.
For the default style the value is 1. See also
parameter(s): line_obs_fc_lty.
Figure(s) using ‘line_lty’: Six different line
types, Partly dashed line,
Two bandwiths in one plot,
Oversterfte in 2020,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
trend-vs-niveau.
line_lty_correct_pdf_and_svg:
auto-fix dashed
lines in pdf and svg. The advice in *.gif/jpg/png is to use ‘line_lty =
3’ for dashed lines. In pdf/svg the intended dashes show up as small
dots instead. This can be solved by replacing ‘line_lty = 3’ with
‘line_lty = 2’ for pdf/svg. The value is of type ‘bool’. For the default style the
value is y.
line_symbol:
add a symbol to your line. This may
be e.g. a dot (1, 19, 20) or a diamond (18). The symbol will be added at
the data points that define your line. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
0, 1, 2, …, 23. For the default style the value is
0. See also parameter(s): dot_shape. Figure(s) using
‘line_symbol’: Ontwikkeling EMU-schuld in
schokscenario’s, Number of phones US
vs. Europe.
line_symbol_col:
color of the symbols that
decorate your line. The colors default to the line color. The value is a
list with elements of the type ‘string’ separated by ‘,’. Example(s):
endeavour, anakiwa, rose, mauvelous, brown, cold_turkey, siren, biscay, dorado, sun.
Figure(s) using ‘line_symbol_col’: Number
of phones US vs. Europe.
lock: this
locks the parameters specified by the ‘locked_settings’ parameter for
the user. In addition, the scaling of fonts is disabled if lock = yes.
On top of that, styles no-legend and no-title are forbidden too, if lock
= yes. The value is of type ‘bool’. For the
default style the value is y. See also
parameter(s): locked_settings.
locked_settings:
the list of parameters that are
locked to the user. The value is a list with
elements of the type ‘string’ separated by ‘,’.
For the default style the value is
draft, resolution, legend_show, footnote_col, footnote_x, footnote_y, footnote_side, footnote_align, footnote_font_style, footnote_font_size, palette.
See also parameter(s): lock, resolution, legend_show, footnote_col, footnote_x, footnote_y, footnote_side, footnote_align, footnote_font_style, footnote_font_size, palette.
logo: shows
CPB-logo above figure. The value is of type
‘bool’. For the default style the value is n.
Figure(s) using ‘logo’: Forecasted
from 1958, Geraamd vanaf
1958, Violent crime rates in the USA.
logo_file:
file that holds your logo. The value
is of type ‘path’. For the default
style the value is ext/img/rijkslogo.png.
logo_height:
height logo should have in the
figure. Width is auto-scaled. The value is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 1.
logo_text_en:
english text next to logo. The
value is of type ‘string’. For the
default style the value is
CPB Netherlands Bureau for\nEconomic Policy Analysis.
logo_text_nl:
dutch text next to logo. The value
is of type ‘string’. For the default
style the value is Centraal Planbureau.
manual_file_name:
not documented yet. The value
is of type ‘r’. For the default style
the value is
paste0("james-", get_param("james_version"), "-manual.html").
manual_R_example_path:
not documented yet. The
value is of type ‘path’. For the
default style the value is examples/R.
manual_xlsx_example_path:
not documented yet. The
value is of type ‘path’. For the
default style the value is examples/xlsx.
manual_xlsx_input_file:
not documented yet. The
value is of type ‘path’. For the
default style the value is ./james-manual.xlsx.
margin_east:
margin right of plotting area. The
value is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 0.635. For the
map style the value is 0.5. For the
world-map style the value is 0. For the
world-map-www style the value is 0.
margin_north:
margin above plotting area. The
value is of type ‘numeric’. Unit: ‘cm’.
Example(s): 1.524. For the default style the value
is 1.3. For the box-plot style the value is
0.95. For the map style the value is
0.8. For the world-map style the value is
0.5. For the world-map-www style the value is
1. For the no-title style the value is
0.7.
margin_north_extra:
not documented yet. The value
is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 0. For the
x-top style the value is 0.2.
margin_south:
margin below plotting area. The
value is of type ‘numeric’. Unit: ‘cm’.
Example(s): 1.905. For the default style the value
is 2.3. For the slide-wide style the value is
2.8. For the map style the value is
1.5. For the world-map style the value is
0. For the world-map-www style the value is
0. For the no-legend style the value is
1.25. For the interactive style the value is
3.
margin_west:
set automatically for most styles.
Sum of maximum width of your labels, plus margin_west_delta. The value
is of type ‘numeric’. Unit: ‘cm’. For the
map style the value is 0.5. For the
world-map style the value is 0. For the
world-map-www style the value is 0.
margin_west_delta:
this is added to margin_west.
margin_west is dynamically calculated based on actual width of your
y_lab‘s, the labels_margin_left and
y_lab_margin_right. This is to guarantee identical
alignment of all your labels at the left side of the plot. The value is
of type ’numeric’. Unit: ‘fraction of width’.
For the default style the value is 0. For the
interactive style the value is -0.04.
name: names
of the individual time series. These overwrite the series names in the
headers of the data sheet and thus also in the legend. Beware: use ;; as
separator between names. The value is a list
with elements of the type ‘string’ separated by
‘;;’. Example(s): bbp;; inflation;; interest. Figure(s)
using ‘name’: Arbeidsmarktregio’s in 2020
volgens CBS, Participatie
gemeenten.
name_col:
this way you can assign specific colors
to specific time series, to ensure each series has one color in
different figures. The value is a list with
elements of the type ‘string’ separated by
‘;;’. Example(s):
bbp = blue;; inflation = yellow;; interest = pink.
Figure(s) using ‘name_col’: Groeibijdragen
bestedingen, Groeibijdragen
bestedingen, Groeibijdragen
bestedingen, Arbeidsmarktregio’s in 2020
volgens CBS.
ocean_file_paths:
not documented yet. The value
is of type ‘r’. For the default style
the value is
c("/cifs/p_james/geo", "m:/p_james/geo", file.path(get_param("install_root_local_dev"), "ext", "geo")).
order:
select subset of time series you want to
plot. You can also change the order (see example). Please note: the
ordering is the very first action (before scaling). It’s the same as
re-ordering the columns in your data tab, yourself. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
1, 4, 2. Figure(s) using ‘order’:
Number of phones US vs. Europe,
Eerste indruk: corona treft ouderen
buitenproportioneel, Tweede
indruk coronadoden: relatief geen verschil 65-80 en 80+,
Bestaande koopwoningen,
Violent crime rates in the USA.
palette:
this parameter defines the colors of
your time series, assigned in the order of appearance. James evaluates
its elements in a recursive manner. Meaning, if the color itself is a
parameter (e.g. ‘cpb’ or ‘kansrijk’), James will replace it
with its parameter value. The values will be evaluated in turn. If a
value is a parameter that refers directly to a color (e.g.
‘sun’ = #fbad1d), then it eventually will be replaced by its hex
triplet. So, you can combine palettes, color names and hex triplets in
any order when defining a palette. You can make a color transparent by
appending two hexadecimal numbers to the hex triplet (e.g. #ff0000 is
red, and #ff000088 is semi-transparent red). These two numbers indicate
the degree of opacity (i.e. 00 means fully transparent, FF means fully
opaque). The default value ‘auto’ chooses the palette based on the
number of time series you have: for 1, 2 or 3, palette cpb_3 is chosen,
for 4 or more, palette cpb is chosen for aesthetic reasons. Please note
that the 0’s are zero’s here. Unfortunately, the main font in this
manual does not clearly distinguish a zero and the letter o. The value
is a list with elements of the type ‘string’ separated by ‘,’. Example(s):
yellow, cpb, #FF0011, appletv. For the default
style the value is auto. For the kansrijk style
the value is kansrijk. For the fan style the value
is fan. For the ppower style the value is
ppower. For the map style the value is
palette_map. For the world-map style the value is
palette_world_map. For the heatmap style the value
is palette_heatmap_high. Figure(s) using ‘palette’:
Partly dashed line,
Oversterfte in 2020,
Heatmap stressing low and high values,
Heatmap stressing low values,
Heatmap stressing high values,
Heatmap stressing middle values,
Groeibijdragen bestedingen,
Arbeidsmarktregio’s in 2020 volgens CBS,
Coloring many series in a clear and unique fashion
is challenging.
palette_map:
example of a palette with only two
blue colors; light one first, dark one second. You can use this palette
to auto-generate a gradient of colors for e.g. regions with
different values that based on the value each need a different color
interpolated from a palette as this. The palette may contain more than
two values. The value is a list with elements
of the type ‘string’ separated by ‘,’. Unit:
‘hex colors or color names’. Example(s):
anakiwa, endeavour, rose. For the default style
the value is endeavour, anakiwa. See also parameter(s): palette.
pandoc_location_windows:
not documented yet. The
value is of type ‘path’. For the
default style the value is
S:/Applicaties/CPB/pandoc.
pandoc_location_windows_bat:
not documented yet.
The value is of type ‘path’. For the
default style the value is
S:\Applicaties\CPB\pandoc.
path_root_linux:
not documented yet. The value is
of type ‘path’. For the default style
the value is /nas/data.
path_root_osx:
not documented yet. The value is
of type ‘path’. For the default style
the value is /Volumes.
path_root_windows:
not documented yet. The value
is of type ‘path’. For the default
style the value is m:.
pdf_dir:
destination directory for your pdf’s.
Use / as separator. The value is of type
‘path’. For the default style the value is ..
plot_order:
plot functions are called in this
order. You may overwrite a function if you want to customize it.
Alternatively, if you want to add your own custom plotting function to
James, please insert its name in this list. The value is a list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is
format_labs_set_margin_west, set_layout_and_init_plot, set_line_distance, forecast_bg, shading, rectangle, axes, gridlines, j_heatmap, area_stack, area, bars, extra_axis_barplot, jbox, dot, linez, linez_lsfit, whisker, label, shading_suppress, custom, user_line, text_label, forecast, margins_0000, j_legend, titles, footnote, logo.
plot_order_geo:
plot functions are called in this
order. You may overwrite a function if you want to customize it.
Alternatively, if you want to add your own custom plotting function to
James, please insert its name in this list. The value is a list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is
geo_init_plot, set_line_distance, geo_plot, margins_0000, j_legend, titles, footnote, logo.
plot_order_world:
plot functions are called in
this order. You may overwrite a function if you want to customize it.
Alternatively, if you want to add your own custom plotting function to
James, please insert its name in this list. The value is a list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is
world_map_init_plot, set_line_distance, world_map_plot, margins_0000, titles, world_map_title_www, footnote, logo.
preprocess_first(p):
this function first scales
your data (if p$scale != 1), then it removes data outside user p$x_lim,
p$y_lim. It puts x-values in p$x and y-values in p$y. The value is of type ‘string’.
preprocess_order:
these functions are called in
this order before plotting. You may add a new function, by
extra_preprocessing(p), where both “james” == class(p) and “james” ==
class(extra_preprocessing(p)). The value is a list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is
add_style, preprocess_data_grouping_variables, validate, draft, append_formula, data_operations, preprocess_first, replicate_params, forecast_pre, label_pre, heatmap_pre, area_stack_pre, hist_pre, bars_pre, whisker_pre, box_pre, linez_pre, area_pre, color_pre, legend_pre, set_lims, set_labs, find_y_r_scaling, logo_pre.
preprocess_order_geo:
these functions are called
in this order before plotting. You may add a new function, by
extra_preprocessing(p), where both “james” == class(p) and “james” ==
class(extra_preprocessing(p)). The value is a list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is
geo_init, geo_validate, geo_pre, logo_pre.
preprocess_order_world:
these functions are
called in this order before plotting. You may add a new function, by
extra_preprocessing(p), where both “james” == class(p) and “james” ==
class(extra_preprocessing(p)). The value is a list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is
world_map_pre, world_map_projection, logo_pre.
project_folder:
not documented yet. The value is
of type ‘path’. For the default style
the value is p_james/release.
publish:
not documented yet. The value is of type ‘bool’. For the default style the
value is select 'publish = y' figures in james-publish.R.
quality:
for jpg only. The value is of type ‘numeric’. Unit: ‘%’. For the
default style the value is 75.
r_version:
use this R version The value is of type ‘string’. For the default style the
value is 4.1.3.
rect_border:
not documented yet. The value is a
list with elements of the type ‘string’ separated by ‘,’. Figure(s) using
‘rect_border’: Different
alignment for PT.
rect_col:
not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is #ff001188. Figure(s)
using ‘rect_col’: Overlapping labels
(NL, PT), Different
alignment for PT.
rect_xleft:
not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using
‘rect_xleft’: Overlapping labels (NL,
PT), Different alignment
for PT.
rect_xright:
not documented yet. The value is a
list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using
‘rect_xright’: Overlapping labels (NL,
PT), Different alignment
for PT.
rect_ybottom:
not documented yet. The value is a
list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using
‘rect_ybottom’: Overlapping labels (NL,
PT), Different alignment
for PT.
rect_ytop:
not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using
‘rect_ytop’: Overlapping labels (NL,
PT), Different alignment
for PT.
region_label_col:
not documented yet. The value
is of type ‘string’. Example(s):
white. For the default style the value is
black.
region_label_font_size:
relative font size. The
value is of type ‘numeric’. Example(s):
0.7, 1.5. For the default style the value is
1.
region_label_font_style:
1 = normal, 2 = bold, 3
= italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s):
1, 2, 3, 4. For the default style the value is
3.
report_default_data_show:
not documented yet. The
value is of type ‘bool’. For the
default style the value is n.
report_default_fig_show:
not documented yet. The
value is of type ‘bool’. For the
default style the value is y.
report_default_file:
not documented yet. The
value is of type ‘path’. For the
default style the value is
ext/snippet/james-report-default.Rmd.
report_default_param_show:
not documented yet.
The value is of type ‘bool’. For the
default style the value is n.
report_dir:
not documented yet. The value is of
type ‘path’. For the default style the
value is report.
report_james_appendix_path:
not documented yet.
The value is of type ‘path’. For the
default style the value is
ext/snippet/james-appendix.Rmd.
report_table_of_content:
not documented yet. The
value is of type ‘bool’. For the
default style the value is y.
report_text:
you can put your report (R-markdown)
text here directly. If you need more space, you can put your text in a
sheet and refer to that sheet with parameter tab. The last
option is to put your text in a separate file using parameter
report_text_file. The value is of type ‘string’. See also parameter(s): tab, report_text_file.
report_yaml_default:
not documented yet. The
value is of type ‘path’. For the
default style the value is
ext/snippet/yaml-default.Rmd.
report_yaml_html:
not documented yet. The value
is of type ‘path’. For the default
style the value is ext/snippet/yaml-html.Rmd.
report_yaml_ioslides:
not documented yet. The
value is of type ‘path’. For the
default style the value is
ext/snippet/yaml-ioslides.Rmd.
report_yaml_pdf:
not documented yet. The value is
of type ‘path’. For the default style
the value is ext/snippet/yaml-pdf.Rmd.
report_yaml_powerpoint:
not documented yet. The
value is of type ‘path’. For the
default style the value is
ext/snippet/yaml-powerpoint.Rmd.
report_yaml_toc:
not documented yet. The value is
of type ‘path’. For the default style
the value is ext/snippet/yaml-toc.Rmd.
report_yaml_word:
not documented yet. The value
is of type ‘path’. For the default
style the value is ext/snippet/yaml-word.Rmd.
resolution:
for png, jpg. The value is of type ‘numeric’. Unit: ‘ppi’. For the
default style the value is 600. See also
parameter(s): font_size, font_size_jpeg, line_distance.
scale: scale
your data. You may use this for example to scale fractions to
percentages (scale = 100). The value is a list
with elements of the type ‘numeric’ separated
by ‘,’. Example(s): 100. For the default style the
value is 1. For the ppower style the value is
100. Figure(s) using ‘scale’:
NL’ers hebben buitenlandse obligaties,
kansrijk,
Tweede indruk coronadoden:
relatief geen verschil 65-80 en 80+, Verlies
van banken na afschrijving 20% van de overheidsschuld van
GIIPS-landen.
server_1:
not documented yet. The value is of type ‘string’. For the default style the
value is cpb-rs-l01p.cpb.nl.
server_2:
not documented yet. The value is of type ‘string’. For the default style the
value is cpb-rs-l02p.cpb.nl.
shading_suppress_col:
not documented yet. The
value is of type ‘string’. For the
default style the value is #ffffff88.
shading_suppress_x_date:
same as
shading_suppress_x, but then with dates instead of numbers. The value is
a list with elements of the type ‘string’ separated by ‘,’. See also
parameter(s): shading_suppress_x. Figure(s)
using ‘shading_suppress_x_date’: Eerste
indruk: corona treft ouderen buitenproportioneel.
style: style
in which your figure will be generated. You can select multiple styles.
First style has highest priority. The last one is always
default; it is implicitly added if you don’t do that
manually. The manual provides an overview of the different styles
available. The value is a list with elements of
the type ‘string’ separated by ‘,’. Example(s):
wide, english. For the kansrijk style the value is
no-title. For the box-plot style the value is
no-legend. For the world-map style the value is
wide. For the world-map-www style the value is
world-map. Figure(s) using ‘style’:
hello-world-bar, Six
different line types,
Industriële productie en
detailhandel, Inflatie,
Inkomenseffecten plannen socialezekerheids- en
belastingstelsel, Kans om in risicogroep te
zitten, kansrijk,
Eerste indruk: corona treft ouderen
buitenproportioneel, Tweede
indruk coronadoden: relatief geen verschil 65-80 en 80+,
Forecasted from 1958,
Decompositie gemiddelde marginale belastingdruk
werknemers 2021 , Standard normal
distribution, geo-first-example,
Arbeidsmarktregio’s in 2020 volgens CBS,
Participatie gemeenten,
World import, customs or balance of payments
(prices), change in july, 2020., World
trade volume change last month, World
trade volume change last month:, ppower,
Verlies van banken na afschrijving 20% van de
overheidsschuld van GIIPS-landen, Violent crime
rates in the USA, Coloring many series in a
clear and unique fashion is challenging,
Older workers more productive?,
Overlapping labels (NL, PT),
Different alignment for
PT, {x,y}lab{bold,italic},
trend-vs-niveau,
Impact no-deal Brexit (tall),
Verwacht verlies in verschillende scenario’s,
Two series of whiskers in one plot,
Mathematical expression in legend.
style_histogram:
not documented yet. The value is
of type ‘string’. For the default
style the value is
for one single histogram of a vector of data..
style_small:
not documented yet. The value is of
type ‘string’. For the default style
the value is
for a slightly smaller figure. This is the standard for figures in a so-called 'frame' (Dutch: 'kader')..
style_world_map:
not documented yet. The value is
of type ‘string’. For the default
style the value is for creating a map of the world..
tab: tab name
of the tab holding the data for the figure. One figure may refer to
multiple tabs, in which case the data will be joined. Multiple figures
may refer to the same tab to ‘get their data’, e.g. if you want
to make the same figure in different languages. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s):
name-of-tab-1, name-of-tab-2. Figure(s) using ‘tab’:
Hello World,
hello-world-bar,
Hello World,
Werkloosheid, Six
different line types, Bbp tijdens
crises, Partly dashed line,
Ontwikkeling EMU-schuld in schokscenario’s,
Number of phones US vs. Europe,
Spanning op arbeidsmarkt blijft
toenemen, Spanning op arbeidsmarkt
blijft toenemen, Spanning op arbeidsmarkt
blijft toenemen, Number of phones in
the world, Number of phones in the
world, Number of phones in the world,
Number of phones in the world,
Number of phones (Europe yellow),
Industriële productie en
detailhandel, NL’ers hebben buitenlandse
obligaties, Two bandwiths in one plot,
Oversterfte in 2020,
Cohorten omvatten veel asielmigranten,
Inflatie, Number of
phones in the world, Percentage bedrijven
dat TOZO gebruikt, Heatmap stressing low
and high values, Heatmap stressing low
values, Heatmap stressing high values,
Heatmap stressing middle values,
Inkomenseffecten plannen socialezekerheids- en
belastingstelsel, Kans om in risicogroep te
zitten, kansrijk,
Forecasted from 1958,
Geraamd vanaf 1958,
Werkverliezers,
Bestaande koopwoningen,
A discontinuity,
Europese steunpakketten,
Decompositie gemiddelde marginale belastingdruk
werknemers 2021 , VWO,
VWO,
VWO,
Tozo,
Investeringen in Nederland¹ door de zwaarst-
getroffen eurolanden in 2018 en vice versa,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
Standard normal distribution,
geo-first-example,
Arbeidsmarktregio’s in 2020 volgens CBS,
Participatie gemeenten,
World import, customs or balance of payments
(prices), change in july, 2020., World
trade volume change last month, World
trade volume change last month:, Phones
per continent, ppower,
Verlies van banken na afschrijving 20% van de
overheidsschuld van GIIPS-landen, Violent crime
rates in the USA, Coloring many series in a
clear and unique fashion is challenging,
Industriële productie en
detailhandel, Older workers more
productive?, Toeslagen,
Rentespreads op overheidsschuld,
Overlapping labels (NL, PT),
Different alignment for
PT, Groeibijdragen
bestedingen, Groeibijdragen
bestedingen, Groeibijdragen
bestedingen, Groeibijdragen
bestedingen,
{x,y}lab{bold,italic},
trend-vs-niveau,
Impact no-deal Brexit (horizontal),
Impact no-deal Brexit (tall),
VMBO,
Verwacht verlies in verschillende scenario’s,
Two series of whiskers in one plot,
Verwacht verlies in verschillende
scenario’s, Economische groei in
Nederland, No auto-scaling,
The use of y_r_lim,
Mathematical expression in legend,
Tozo-uitkeringen per maand.
text_col:
the color of the label. The value is a
list with elements of the type ‘string’ separated by ‘,’. Example(s):
black, rose, green. For the default style the
value is black. Figure(s) using ‘text_col’:
Oversterfte in 2020,
Industriële productie en
detailhandel, Impact no-deal Brexit
(horizontal), Impact no-deal
Brexit (tall).
text_font_size:
relative font size. The value is
a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
0.7, 1.5. For the default style the value is
1. Figure(s) using ‘text_font_size’:
Industriële productie en
detailhandel.
text_font_style:
1 = normal, 2 = bold, 3 =
italic, 4 = bold and italic. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
1, 2, 3, 4. For the default style the value is
3. Figure(s) using ‘text_font_style’:
Older workers more productive?.
text_label:
the text label you want to show in
the figure. The value is a list with elements
of the type ‘string’ separated by ‘;;’.
Example(s): first label;; second label. Figure(s) using
‘text_label’: Oversterfte in 2020,
Industriële productie en
detailhandel, Older workers more
productive?, Rentespreads op
overheidsschuld, Impact no-deal
Brexit (horizontal), Impact
no-deal Brexit (tall).
text_offset:
distance (‘offset’) of the text
label from the specified coordinate in fractions of the width of the
letter ‘m’. The value is a list with elements
of the type ‘numeric’ separated by ‘,’. For the
default style the value is 0.5. Figure(s) using
‘text_offset’: Different
alignment for PT.
text_pos:
alignment of your text label. Leave
empty if you want your text centerd on the given (x,y) coordinates. Or:
1 = below, 2 = left, 3 = above, 4 = right. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
1, 2, 3, 4. Figure(s) using ‘text_pos’:
Oversterfte in 2020,
Older workers more productive?,
Rentespreads op overheidsschuld.
text_rotation:
the rotation of the label in
degrees counterclockwise. Zero (0) means horizontal, 90 means vertical.
The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
0, 45, 90. For the default style the value is
0. Figure(s) using ‘text_rotation’:
Industriële productie en
detailhandel, Impact no-deal Brexit
(horizontal).
text_x: the
x-position of your text label. If your x-axis is numeric, just put the
value here. If you use bars, then text_x works as follows. The x-value
of the first x-position is 1, i.e. where the first (set of)
bars are located. The second is 2, etc. So, if you want your label
inbetween the first two x-position, you should use 1.5 as a value. If
your x-axis holds dates, please use text_x_date instead. The value is a
list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using
‘text_x’: Oversterfte in 2020,
Industriële productie en
detailhandel, Older workers more
productive?, Impact no-deal Brexit
(horizontal), Impact no-deal
Brexit (tall).
text_x_date:
if your x-axis consists of dates,
you should use this parameter instead of text_x, to indicate what the
x-postion of your text label is. Please mark the cell in Excel as a
‘date’ (i.e. not as a regular number). The value is a list with elements of the type ‘Date’ separated by ‘,’. Example(s):
2020-03-18. Figure(s) using ‘text_x_date’:
Rentespreads op overheidsschuld.
text_y: the
y-postion of your text label. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using
‘text_y’: Oversterfte in 2020,
Industriële productie en
detailhandel, Older workers more
productive?, Rentespreads op
overheidsschuld, Impact no-deal
Brexit (horizontal), Impact
no-deal Brexit (tall).
time_stamp:
adds time-stamp to file name. The
value is of type ‘bool’. For the
default style the value is n.
title: the
title of your figure. Its font size automatically scales with the length
of the title if it would exceed the figure’s width. You may use
backslash-n to add a newline to your title. The value is of type ‘string’. For the ppower style the
value is Koopkrachtontwikkeling. Figure(s) using ‘title’:
Hello World,
Hello World,
Werkloosheid, Six
different line types, Bbp tijdens
crises, Partly dashed line,
Ontwikkeling EMU-schuld in schokscenario’s,
Number of phones US vs. Europe,
Spanning op arbeidsmarkt blijft
toenemen, Spanning op arbeidsmarkt
blijft toenemen, Spanning op arbeidsmarkt
blijft toenemen, Number of phones in
the world, Number of phones in the
world, Number of phones in the world,
Number of phones in the world,
Number of phones (Europe yellow),
Industriële productie en
detailhandel, NL’ers hebben buitenlandse
obligaties, Two bandwiths in one plot,
Oversterfte in 2020,
Cohorten omvatten veel asielmigranten,
Inflatie, Number of
phones in the world, Percentage bedrijven
dat TOZO gebruikt, Heatmap stressing low
and high values, Heatmap stressing low
values, Heatmap stressing high values,
Heatmap stressing middle values,
Inkomenseffecten plannen socialezekerheids- en
belastingstelsel, Kans om in risicogroep te
zitten, Bestaande
koopwoningen, Eerste indruk: corona treft
ouderen buitenproportioneel,
Tweede indruk coronadoden:
relatief geen verschil 65-80 en 80+,
Forecasted from 1958,
Geraamd vanaf 1958,
Werkverliezers,
Bestaande koopwoningen,
A discontinuity,
Europese steunpakketten,
Decompositie gemiddelde marginale belastingdruk
werknemers 2021 , VWO,
VWO,
VWO,
Tozo,
Investeringen in Nederland¹ door de zwaarst-
getroffen eurolanden in 2018 en vice versa,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
Standard normal distribution,
Arbeidsmarktregio’s in 2020 volgens CBS,
Participatie gemeenten,
World import, customs or balance of payments
(prices), change in july, 2020., World
trade volume change last month, World
trade volume change last month:, Phones
per continent, Verlies van banken na
afschrijving 20% van de overheidsschuld van GIIPS-landen,
Violent crime rates in the USA,
Coloring many series in a clear and unique fashion
is challenging, Industriële productie
en detailhandel, Older workers more
productive?, Toeslagen,
Rentespreads op overheidsschuld,
Overlapping labels (NL, PT),
Different alignment for
PT, Groeibijdragen
bestedingen, Groeibijdragen
bestedingen, Groeibijdragen
bestedingen, Groeibijdragen
bestedingen,
{x,y}lab{bold,italic},
Impact no-deal Brexit (horizontal),
Impact no-deal Brexit (tall),
VMBO,
Verwacht verlies in verschillende scenario’s,
Two series of whiskers in one plot,
Verwacht verlies in verschillende
scenario’s, Economische groei in
Nederland, No auto-scaling,
The use of y_r_lim,
Mathematical expression in legend,
Tozo-uitkeringen per maand.
title_align:
alignment of title. The value is of
type ‘string’. Example(s):
left, center, right. For the default style the
value is left.
title_col:
color of title text. The value is of
type ‘string’. For the default style
the value is black.
title_font_size:
relative font size of title
compared to font_size. Font sizes is scaled automatically
down if your title exceeds the margin (same as
title_margin_left) at the right side of the figure. The
value is of type ‘numeric’. For the
default style the value is 1.28571.
transformation:
this transformation function will
be applied to each y-value individually. The value is of type ‘string’. Example(s):
log, function(x) x^2. Figure(s) using ‘transformation’:
Werkverliezers.
turn:
transpose plot. The value is of type ‘bool’. For the default style the
value is n. Figure(s) using ‘turn’:
hello-world-bar,
Inkomenseffecten plannen socialezekerheids- en
belastingstelsel, Kans om in risicogroep te
zitten, kansrijk,
Europese steunpakketten,
VWO, VWO,
Groeibijdragen bestedingen,
Verlies van banken na afschrijving 20% van de
overheidsschuld van GIIPS-landen, Violent crime
rates in the USA, Impact
no-deal Brexit (tall),
VMBO,
Verwacht verlies in verschillende scenario’s.
type: chart
type per time series. James assumes line for series that
are not specified. The value is a list with
elements of the type ‘string’ separated by ‘,’.
Example(s):
area, area=, bar--, bar=, box, dot, geo, heatmap, line, param, whisker.
For the default style the value is line. For the
fan style the value is
line, area, area, area, area, area, area. For the
ppower style the value is dot, line, line, line.
For the histogram style the value is bar--.
Figure(s) using ‘type’: report,
Hello World,
hello-world-bar,
Hello World,
Werkloosheid, Six
different line types, Ontwikkeling EMU-schuld
in schokscenario’s, Number of phones
US vs. Europe, Number of phones in
the world, Number of phones in the
world, Number of phones in the world,
Number of phones in the world,
Number of phones (Europe yellow),
Industriële productie en
detailhandel, NL’ers hebben buitenlandse
obligaties, Two bandwiths in one plot,
Oversterfte in 2020,
Cohorten omvatten veel asielmigranten,
Number of phones in the world,
Percentage bedrijven dat TOZO gebruikt,
Heatmap stressing low and high values,
Heatmap stressing low values,
Heatmap stressing high values,
Heatmap stressing middle values,
Inkomenseffecten plannen socialezekerheids- en
belastingstelsel, Kans om in risicogroep te
zitten, kansrijk,
Bestaande koopwoningen,
Eerste indruk: corona treft ouderen
buitenproportioneel, Tweede
indruk coronadoden: relatief geen verschil 65-80 en 80+,
Forecasted from 1958,
Geraamd vanaf 1958,
Werkverliezers,
Bestaande koopwoningen,
A discontinuity,
Europese steunpakketten,
Decompositie gemiddelde marginale belastingdruk
werknemers 2021 , VWO,
VWO,
VWO,
Tozo,
Investeringen in Nederland¹ door de zwaarst-
getroffen eurolanden in 2018 en vice versa,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
Phones per continent,
Verlies van banken na afschrijving 20% van de
overheidsschuld van GIIPS-landen, Violent crime
rates in the USA, Older workers more
productive?, Overlapping labels (NL,
PT), Different alignment
for PT, {x,y}lab{bold,italic},
trend-vs-niveau,
Impact no-deal Brexit (horizontal),
Impact no-deal Brexit (tall),
VMBO,
Verwacht verlies in verschillende scenario’s,
Two series of whiskers in one plot,
Verwacht verlies in verschillende
scenario’s, Economische groei in
Nederland, No auto-scaling,
The use of y_r_lim,
Tozo-uitkeringen per maand.
vline_dash:
not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using
‘vline_dash’: Oversterfte in 2020,
Impact no-deal Brexit (horizontal),
Impact no-deal Brexit (tall).
vline_dash_col:
not documented yet. The value is
of type ‘string’. For the default
style the value is black. Figure(s) using ‘vline_dash_col’:
Oversterfte in 2020.
vline_dash_date:
not documented yet. The value is
a list with elements of the type ‘string’ separated by ‘,’. Example(s):
2020-12-31. Figure(s) using ‘vline_dash_date’:
Eerste indruk: corona treft ouderen
buitenproportioneel, Rentespreads op
overheidsschuld.
vline_dash_lty:
not documented yet. The value is
of type ‘numeric’. For the default
style the value is 3.
vline_dash_lwd:
not documented yet. The value is
of type ‘numeric’. For the default
style the value is 1.
whisker_col:
color of whiskers. You can supply a
different color for each whisker. The value is a list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is black. Figure(s) using
‘whisker_col’: Verwacht verlies in verschillende
scenario’s, Two series of whiskers in
one plot.
whisker_edge_length:
not documented yet. The
value is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 7.0000000000000007E-2.
whisker_legend_col:
color of whiskers in legend.
If no value specified, whiskers will take same color as in figure. The
value is of type ‘string’. Figure(s) using
‘whisker_legend_col’: Two series of
whiskers in one plot.
whisker_legend_show_n:
the number of whiskers you
want to show in your legend. If different whiskers for different series
have different meanings, you may want to show them all. If you don’t
want to see whiskers in your legend, then set whisker_legend_show_n = 0.
Please note that you can change the order of the whiskers in your data
if needed. The value is of type ‘numeric’.
Example(s): 0, 1, 2, …. For the default style the
value is 1. Figure(s) using ‘whisker_legend_show_n’:
Impact no-deal Brexit (horizontal),
Impact no-deal Brexit (tall),
VMBO,
Two series of whiskers in one plot.
whisker_lwd:
not documented yet. The value is of
type ‘numeric’. For the default style
the value is 0.5.
whisker_series:
time series which this series
corresponds to. The default value is set so that your first whisker
definition is superimposed on the first time series (bar–), the second
on the second, etc. If, for example, you have a whisker for only one of
the time series, you can indicate here which time series that is. The
value is a list with elements of the type ‘numeric’ separated by ‘,’. For the
default style the value is
1, 2, 3, 4, 5, 6, 7, 8, 9, 10. Figure(s) using
‘whisker_series’: Verwacht verlies in
verschillende scenario’s.
width: width
of the resulting image. The value is of type
‘numeric’. Unit: ‘cm’. For the default style the value is
7.5. For the small style the value is
6.8. For the kansrijk style the value is
12.5. For the big style the value is
15. For the slide style the value is
14.2. For the slide-wide style the value is
21. For the wide style the value is
15.5. For the world-map style the value is
15.5.
world_map_country_border_col:
not documented yet.
The value is of type ‘string’. For the
world-map style the value is white.
world_map_country_border_lwd:
not documented yet.
The value is of type ‘numeric’. For the
world-map style the value is 1.
world_map_country_no_data_col:
not documented
yet. The value is of type ‘string’. For the
world-map style the value is gray95.
world_map_legend_dot_col:
not documented yet. The
value is of type ‘string’. For the
world-map style the value is anakiwa.
world_map_legend_dot_size:
not documented yet.
The value is of type ‘numeric’. For the
world-map style the value is 0.5.
world_map_legend_font_col:
not documented yet.
The value is of type ‘string’. For the
world-map style the value is endeavour.
world_map_legend_font_size:
not documented yet.
The value is of type ‘numeric’. For the
world-map style the value is 1.3.
world_map_ocean_border_col:
not documented yet.
The value is of type ‘string’. For the
world-map style the value is anakiwa.
world_map_ocean_col:
not documented yet. The
value is of type ‘string’. For the
world-map style the value is anakiwa.
world_map_projection:
maps are flat (2D), while
the earth is a sphere (3D). Here you can choose which projection you
want to use to project the 3D earth on a 2D flat. https://proj.org/operations/projections/index.html
contains an overview. Please use the ‘proj-string’ below the image. See
for example the default projection (‘hatano’) which we use: https://proj.org/operations/projections/hatano.html. The
value is of type ‘string’. For the
world-map style the value is +proj=hatano.
world_map_threshold_legend_n_decimals:
not
documented yet. The value is of type ‘numeric’.
For the world-map style the value is 1.
world_map_title_bg_col:
not documented yet. The
value is of type ‘string’. For the
world-map style the value is endeavour.
world_map_title_col:
not documented yet. The
value is of type ‘string’. For the
world-map style the value is white.
world_map_title_font_size:
not documented yet.
The value is of type ‘numeric’. For the
world-map style the value is 2.1.
world_map_value:
not documented yet. The value is
of type ‘numeric’. Figure(s) using
‘world_map_value’: World trade volume
change last month:.
world_map_value_col:
not documented yet. The
value is of type ‘string’. For the
world-map style the value is white.
world_map_value_font_size:
not documented yet.
The value is of type ‘numeric’. For the
world-map style the value is 3.
world_map_value_n_decimals:
not documented yet.
The value is of type ‘numeric’. For the
world-map style the value is 1.
world_map_value_symbol:
not documented yet. The
value is of type ‘string’. For the
world-map style the value is %.
x_at_date:
position in terms of dates at which
you want labels at the x-axis. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s):
yyyy-mm-dd, yyyy-mm, yy-m, yy-m-d or a combination.. See
also parameter(s): x_at, x_lab, x_date_format. Figure(s) using
‘x_at_date’: Tozo-uitkeringen per maand.
x_axis_bold_col:
color of x-axis. The value is of
type ‘string’. For the default style
the value is black. See also parameter(s): x_axis_bold_if_zero.
x_axis_bold_if_zero:
switch off the horizontal
bold line if you don’t want it. The value is of type ‘bool’. For the default style the
value is y. For the heatmap style the value is
n. See also parameter(s): x_axis_show.
x_axis_bold_lwd:
line width of x-axis. The value
is of type ‘numeric’. For the default
style the value is 1. See also parameter(s): x_axis_bold_if_zero.
x_axis_show:
show the x-axis. Set n
if you want to hide x_lab and x_ticks. The grid lines (parameter y_at)
are shown independently of the axis. The value is of type ‘bool’. For the default style the
value is y. See also parameter(s): x_lab, x_ticks, y_axis_show, y_at. Figure(s) using ‘x_axis_show’:
Six different line types,
trend-vs-niveau.
x_date_format:
defines the date format for date
labels on the x-axis. A ‘d’ stands for the day of the month. Two d’s
(‘dd’) will ensure that days will always have two digits (e.g., not 1
but 01). Same for the number of the month: ‘m’, ‘mm’, respectively. A
‘q’ indicates the quarter of a year (1-4). Using ‘month’ will replace
the number of the month by its abbreviated name. Use ‘month_full’ to get
the full name. Setting ‘style = english’ will translate Dutch month
names to English. Year can be either two or for digits: yy or yyyy. You
can use the separator you want (e.g. ‘-’, ‘/’, or a whitespace ’ ‘). You
can also choose to use a newline () so move the second part of your date
to the next line. Please note that you can use a quote to abbreviate
yyyy to ’yy. The value is of type ’string’.
Example(s):
m-yyyy, dd-mm-yyyy, d month_full yyyy, yyyy/month, month, d-m-yy, d-mm-'yy, d-month-'yy, month yyyy, month_full\nyyyy, qq-yyyy.
For the default style the value is yyyy. See also
parameter(s): month_nl, month_en, month_nl_full, month_en_full, x_lab_date_show. Figure(s) using
‘x_date_format’: Economische groei in
Nederland, No auto-scaling,
The use of y_r_lim,
Tozo-uitkeringen per maand.
x_lab: the
labels you want at the positions x_at. The value is a list with elements of the type ‘string’ separated by ‘;;’. See also
parameter(s): x_at, x_ticks, x_lab_bold, x_lab_italic.
x_lab_as_text:
if ‘y’, values at the x-axis are
seen as text instead of numbers. This enables you to show equidistant
bars above unequally spaced x-values (years 2000, 2009, 2010). The value
is of type ‘bool’. Figure(s) using
‘x_lab_as_text’: Number of phones in the
world, Number of phones in the world,
Tozo.
x_lab_big_mark_show:
for the values at the
x-axis, use y if you want a character between every three
digits left of the decimal separator. The value is of type ‘bool’. For the default style the
value is n. Figure(s) using ‘x_lab_big_mark_show’:
Decompositie gemiddelde marginale belastingdruk
werknemers 2021 , Toeslagen.
x_lab_bold:
makes the i’th label bold. You can
combine bold with italic. The value is a list
with elements of the type ‘numeric’ separated
by ‘,’. Unit: ‘index’. See also parameter(s): x_lab, x_lab_italic, y_lab_italic. Figure(s) using
‘x_lab_bold’: {x,y}lab{bold,italic}.
x_lab_col:
not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is black. Figure(s) using
‘x_lab_col’: Impact no-deal Brexit
(horizontal), Impact no-deal
Brexit (tall).
x_lab_date_show:
if y, dates are
shown instead of numbers (n). The value is of type ‘bool’. See also parameter(s): x_date_format. Figure(s) using
‘x_lab_date_show’: Economische groei in
Nederland, No auto-scaling,
The use of y_r_lim.
x_lab_font_size:
relative font size of the labels
on the x-axis. The value is of type ‘numeric’.
For the default style the value is 1. Figure(s)
using ‘x_lab_font_size’: Investeringen in
Nederland¹ door de zwaarst- getroffen eurolanden in 2018 en vice
versa.
x_lab_group_v_shift:
downshift of the
group-labels below the x-axis. The value is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 0.5.
x_lab_italic:
makes the i’th label italic. The
value is a list with elements of the type ‘numeric’ separated by ‘,’. Unit: ‘index’.
See also parameter(s): x_lab, x_lab_bold, y_lab_bold. Figure(s) using
‘x_lab_italic’:
{x,y}lab{bold,italic}.
x_lab_rotation:
rotate the labels at the x-axis.
Zero (0) for horizontal. 90 for vertical. The value is of type ‘numeric’. Unit: ‘degrees’. Example(s):
0, 45, 90. For the default style the value is
0. Figure(s) using ‘x_lab_rotation’:
Impact no-deal Brexit (horizontal).
x_lab_v_shift:
downshift of the labels at the
x-axis. The value is of type ‘numeric’. Unit:
‘cm’. For the default style the value is 0.15.
x_lim:
restrict the range of the x-axis to this
limit. The value is a list with elements of the
type ‘numeric’ separated by ‘,’. Example(s):
0, 100. See also parameter(s): y_lim, x_keep, x_lim_follow_data. Figure(s)
using ‘x_lim’: Ontwikkeling EMU-schuld in
schokscenario’s, Oversterfte in 2020,
Rentespreads op overheidsschuld,
Overlapping labels (NL, PT),
Different alignment for
PT, Groeibijdragen bestedingen,
Two series of whiskers in one plot.
x_lim_follow_data:
if you don’t care about nice
labels on the left and right side of the x-axis but if you want to zoom
in to your data as much as possible, you can set this parameter to ‘y’.
The value is of type ‘bool’. For the
default style the value is n. See also
parameter(s): x_lim, x_keep. Figure(s) using
‘x_lim_follow_data’: Six different line types,
Industriële productie en
detailhandel, NL’ers hebben buitenlandse
obligaties, Geraamd vanaf
1958, Werkverliezers,
Groeibijdragen bestedingen.
x_n_decimals:
number of digits right of decimal
separator on x-axis. If you don’t provide a number, the number of digits
will be automatically determined based on the values on the axis. The
larger interval the values these span, the less digits shown. The value
is of type ‘numeric’. Example(s):
1, 2.
x_scale:
scales the x-axis. The value is of type ‘numeric’. Example(s):
0.001, 100. For the default style the value is
1. For the ppower style the value is
1E-3. Figure(s) using ‘x_scale’:
Decompositie gemiddelde marginale belastingdruk
werknemers 2021 .
x_shading:
vertical shading (from, to, from, to,
etc.). The value is a list with elements of the
type ‘numeric’ separated by ‘,’. Example(s):
2000, 2005, 2010, 2015. See also parameter(s): shading_suppress_x.
x_shading_col:
not documented yet. The value is a
list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is #00000022. Figure(s)
using ‘x_shading_col’: Tweede
indruk coronadoden: relatief geen verschil 65-80 en 80+.
x_shading_date:
same as x_shading, but then with
dates instead of numbers. The value is a list
with elements of the type ‘string’ separated by
‘,’. See also parameter(s): x_shading. Figure(s) using
‘x_shading_date’: Tweede indruk
coronadoden: relatief geen verschil 65-80 en 80+,
Tozo-uitkeringen per maand.
x_ticks:
overrule the default ticks at the
x-axis. Leave empty for default (x_at). NB this parameter is used only
if x_ticks_date is not given. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s):
1990, 1995, 1997, 2000. See also parameter(s): x_ticks_date, x_ticks_lwd, x_ticks_length, x_ticks_col, x_ticks_vshift. Figure(s) using
‘x_ticks’: VWO,
Impact no-deal Brexit (horizontal),
Impact no-deal Brexit (tall).
x_ticks_col:
not documented yet. The value is of
type ‘string’. For the default style
the value is black.
x_ticks_date:
choose one or two if you want ticks
at these places. Beware, the default ticks will not be shown now (set
x_ticks_show = y if you want them too). The value is a list with elements of the type ‘string’ separated by ‘,’. Unit: ‘unit of
time’. Example(s): years, quarters, months, weeks, days.
See also parameter(s): x_ticks.
Figure(s) using ‘x_ticks_date’:
Groeibijdragen bestedingen,
Economische groei in Nederland,
No auto-scaling,
The use of y_r_lim,
Tozo-uitkeringen per maand.
x_ticks_length:
not documented yet. The value is
of type ‘numeric’. Example(s):
-1.4999999999999999E-2. For the default style the
value is -2.5000000000000001E-2. For the no-legend
style the value is -0.02.
x_ticks_length_date:
not documented yet. The
value is of type ‘numeric’. For the
default style the value is -0.03.
x_ticks_lwd:
not documented yet. The value is of
type ‘numeric’. For the default style
the value is 0.25. For the heatmap style the value
is 0.
x_ticks_vshift:
vertical shift of the x-axis.
Positive means shift downwards. The value is of type ‘numeric’. Unit: ‘line’. Example(s):
-0.5. For the default style the value is
0.
x_title:
title/label at the x-axis. The value is
of type ‘string’. Example(s):
Years. For the ppower style the value is
bruto huishoudinkomen (dzd euro). Figure(s) using
‘x_title’: Hello World,
hello-world-bar,
Hello World,
Bbp tijdens crises,
Partly dashed line,
Spanning op arbeidsmarkt blijft
toenemen, Spanning op arbeidsmarkt
blijft toenemen, Spanning op arbeidsmarkt
blijft toenemen, Oversterfte in 2020,
Number of phones in the world,
Percentage bedrijven dat TOZO gebruikt,
Heatmap stressing low and high values,
Heatmap stressing low values,
Heatmap stressing high values,
Heatmap stressing middle values,
Kans om in risicogroep te zitten,
Decompositie gemiddelde marginale belastingdruk
werknemers 2021 , Tozo,
Investeringen in Nederland¹ door de zwaarst-
getroffen eurolanden in 2018 en vice versa,
Verlies van banken na afschrijving 20% van de
overheidsschuld van GIIPS-landen, Violent crime
rates in the USA, Older workers more
productive?, Toeslagen,
Overlapping labels (NL, PT),
Different alignment for
PT, trend-vs-niveau,
Two series of whiskers in one plot,
Mathematical expression in legend.
x_title_align:
x_title_align The value is of type ‘string’. Example(s):
left, center, right. For the default style the
value is right. Figure(s) using ‘x_title_align’:
Investeringen in Nederland¹ door de zwaarst-
getroffen eurolanden in 2018 en vice versa,
Verlies van banken na afschrijving 20% van de
overheidsschuld van GIIPS-landen.
x_title_align_turn:
x_title_align_turn The value
is of type ‘string’. Example(s):
left, center, right. For the default style the
value is left.
x_title_col:
not documented yet. The value is of
type ‘string’. For the default style
the value is black.
x_title_font_size:
relative font size of x-axis
title/label. The value is of type ‘numeric’.
For the default style the value is 1.
x_title_v_shift:
distance below margin_south. The
value is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 0.6. Figure(s) using
‘x_title_v_shift’: Investeringen in Nederland¹
door de zwaarst- getroffen eurolanden in 2018 en vice versa.
x_top_lab_col:
not documented yet. The value is
of type ‘string’. For the default
style the value is black.
y_at:
position at which you want labels and
gridlines at the y-axis. The value is a list
with elements of the type ‘numeric’ separated
by ‘,’. Example(s): 0, 20, 40, 60, 80, 100. Figure(s) using
‘y_at’: ppower, Verlies van
banken na afschrijving 20% van de overheidsschuld van GIIPS-landen,
{x,y}lab{bold,italic},
Impact no-deal Brexit (horizontal).
y_axis:
indicates for each of the respective time
series whether they are projected on the left (l) y-axis or on the right
(r) y-axis. If one or more series are on the right axis, style ‘y-right’
or ‘x-top’ (if ‘turn = y’) is automatically added as a style. The value
is a list with elements of the type ‘string’ separated by ‘,’. Example(s):
l, l, l, r, r. For the default style the value is
l. See also parameter(s): style, turn.
Figure(s) using ‘y_axis’: Verlies van banken na
afschrijving 20% van de overheidsschuld van GIIPS-landen,
Economische groei in Nederland,
No auto-scaling,
The use of y_r_lim.
y_axis_show:
use n if you want to
hide y_lab. Contrary to the x-axis, the y-axis does not have ticks. The
value is of type ‘bool’. For the
default style the value is y. See also
parameter(s): y_lab, x_axis_show. Figure(s) using
‘y_axis_show’: trend-vs-niveau.
y_force_include_zero:
expand y_lim so zero (y =
0, x-axis) is in range. Defaults to ‘n’. In case of stacked bars (bar=)
it defaults to ‘y’. The value is of type
‘bool’.
y_lab: the
text labels you want at the positions y_at at your left y-axis. Please
note that the number of values, which you specify for y_lab, should
match the number of values of y_at. If you don’t specify y_at yourself,
then you will depend on the number of values that is set for y_at by
James automatically. Please beware that the (number of) values for y_at
may change if you update your data set. So in general, the advice is to
manually set y_at too, if you choose to set y_lab manually. The value is
a list with elements of the type ‘string’ separated by ‘;;’. See also
parameter(s): y_lab_col, y_r_lab. Figure(s) using ‘y_lab’:
Six different line types,
Impact no-deal Brexit (horizontal),
Impact no-deal Brexit (tall).
y_lab_big_mark_show:
for the values at the
y-axis, use y if you want a character between every three
digits left of the decimal separator. The value is of type ‘bool’. For the default style the
value is y.
y_lab_bold:
makes the i’th label bold. You can
combine bold with italic. The value is a list
with elements of the type ‘numeric’ separated
by ‘,’. Unit: ‘index’. See also parameter(s): y_lab, x_lab_italic, y_lab_italic. Figure(s) using
‘y_lab_bold’: {x,y}lab{bold,italic}.
y_lab_col:
color of labels at left y-axis. The
value is a list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is black. See also
parameter(s): y_lab. Figure(s) using
‘y_lab_col’: Impact no-deal Brexit
(horizontal).
y_lab_font_size:
relative font size of the labels
on the y-axis. The value is of type ‘numeric’.
For the default style the value is 1.
y_lab_italic:
makes the i’th label italic. The
value is a list with elements of the type ‘numeric’ separated by ‘,’. Unit: ‘index’.
See also parameter(s): y_lab, x_lab_bold, y_lab_bold. Figure(s) using
‘y_lab_italic’:
{x,y}lab{bold,italic}.
y_lab_margin_right:
margin between y_lab and
plotting area. The value is of type ‘numeric’.
Unit: ‘fraction of width’. For the default style the value is
1.4999999999999999E-2.
y_n_decimals:
number of digits right of decimal
separator on y-axis. The value is of type
‘numeric’. Example(s): 1, 2. See also parameter(s): y_r_n_decimals, x_n_decimals.
y_r_at: the
numbers you want at the right y-axis at the gridlines. Please note that
the numbers should be equidistant. Please leave empty to let James find
proper values. The value is a list with
elements of the type ‘numeric’ separated by
‘,’. Example(s): 1.0, 1.5, 3.0. See also parameter(s): y_r_lab, y_r_lab_col, y_r_n_decimals.
y_r_lab:
the text labels you want at the
positions y_at at your left y-axis. The value is a list with elements of the type ‘string’ separated by ‘;;’. See also
parameter(s): y_r_at, y_lab, y_r_lab_col. Figure(s) using
‘y_r_lab’: Six different line types,
Impact no-deal Brexit (horizontal),
Impact no-deal Brexit (tall).
y_r_lab_col:
not documented yet. The value is a
list with elements of the type ‘string’ separated by ‘,’. For the
default style the value is black. Figure(s) using
‘y_r_lab_col’: Impact no-deal
Brexit (tall).
y_r_lim:
set limit of right y-axis (see y_lim).
Please note that, based on the given y_r_lim range, James tries to find
‘nice values’ for the right y-axis, where the number of values equals
the number of gridlines as given by the left y-axis. The value is a list with elements of the type ‘numeric’ separated by ‘,’. See also
parameter(s): y_lim, y_r_n_decimals. Figure(s) using
‘y_r_lim’: The use of y_r_lim.
y_r_n_decimals:
number of digits right of decimal
separator on right y-axis. The value is of type
‘numeric’. Example(s): 1, 2. See also parameter(s): y_n_decimals, x_n_decimals. Figure(s) using
‘y_r_n_decimals’: No
auto-scaling.
y_r_scale_auto:
lets James find scale the right
y-axis so that (i) the number of values on the right y-axis is equal to
the number of gridlines as set by the left y-axis, and (ii) the values
on the right y-axis are ‘pretty’. The value is of type ‘bool’. For the default style the
value is y. See also parameter(s): y_r_n_decimals. Figure(s) using
‘y_r_scale_auto’: No
auto-scaling.
y_r_title:
title/label at the right y-axis. The
value is of type ‘string’. Figure(s) using
‘y_r_title’: Verlies van banken na afschrijving 20%
van de overheidsschuld van GIIPS-landen,
Impact no-deal Brexit (horizontal),
Impact no-deal Brexit (tall),
Economische groei in Nederland,
No auto-scaling,
The use of y_r_lim.
y_r_title_col:
not documented yet. The value is
of type ‘string’. For the default
style the value is black. Figure(s) using ‘y_r_title_col’:
Impact no-deal Brexit (tall).
y_title:
title/label at the y-axis. The value is
of type ‘string’. Example(s):
Price (euro). For the ppower style the value is
verandering koopkracht (%). Figure(s) using ‘y_title’:
Hello World,
hello-world-bar,
Hello World,
Werkloosheid,
Bbp tijdens crises,
Partly dashed line,
Ontwikkeling EMU-schuld in schokscenario’s,
Spanning op arbeidsmarkt blijft
toenemen, Spanning op arbeidsmarkt
blijft toenemen, Spanning op arbeidsmarkt
blijft toenemen,
Industriële productie en
detailhandel, NL’ers hebben buitenlandse
obligaties, Oversterfte in 2020,
Cohorten omvatten veel asielmigranten,
Inflatie, Number of
phones in the world, Percentage bedrijven
dat TOZO gebruikt, Heatmap stressing low
and high values, Heatmap stressing low
values, Heatmap stressing high values,
Heatmap stressing middle values,
Inkomenseffecten plannen socialezekerheids- en
belastingstelsel, Kans om in risicogroep te
zitten, kansrijk,
Bestaande koopwoningen,
Eerste indruk: corona treft ouderen
buitenproportioneel, Tweede
indruk coronadoden: relatief geen verschil 65-80 en 80+,
Werkverliezers,
Bestaande koopwoningen,
Europese steunpakketten,
Decompositie gemiddelde marginale belastingdruk
werknemers 2021 , VWO,
VWO,
VWO,
Tozo,
Investeringen in Nederland¹ door de zwaarst-
getroffen eurolanden in 2018 en vice versa,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
Groeibijdragen bestedingen,
Standard normal distribution,
Phones per continent,
Verlies van banken na afschrijving 20% van de
overheidsschuld van GIIPS-landen, Violent crime
rates in the USA, Industriële
productie en detailhandel, Older workers
more productive?, Toeslagen,
Rentespreads op overheidsschuld,
Overlapping labels (NL, PT),
Different alignment for
PT, Groeibijdragen
bestedingen, Groeibijdragen
bestedingen, Groeibijdragen
bestedingen, Groeibijdragen
bestedingen, trend-vs-niveau,
Impact no-deal Brexit (horizontal),
Impact no-deal Brexit (tall),
VMBO,
Verwacht verlies in verschillende scenario’s,
Two series of whiskers in one plot,
Verwacht verlies in verschillende
scenario’s, Economische groei in
Nederland, No auto-scaling,
The use of y_r_lim,
Mathematical expression in legend,
Tozo-uitkeringen per maand.
y_title_align:
not documented yet. The value is
of type ‘string’. Example(s):
left, center, right. For the default style the
value is left. For the x-top style the value is
right.
y_title_align_turn:
not documented yet. The value
is of type ‘string’. For the default
style the value is right.
y_title_col:
not documented yet. The value is of
type ‘string’. For the default style
the value is black. Figure(s) using ‘y_title_col’:
Impact no-deal Brexit (horizontal).
y_title_font_size:
relative font size of y-axis
title/label. The value is of type ‘numeric’.
For the default style the value is 1.
y_title_v_shift:
distance above margin_north. The
value is of type ‘numeric’. Unit: ‘cm’. For the
default style the value is 0.35. For the
box-plot style the value is 0.3.